Adding jshint options to ensure code quality

Bug #1438620 reported by Thai Tran
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Thai Tran

Bug Description

Adding detection for unused variables for general code cleanup.
Adding detection for using undefined variables for spotting
leaking and mistyped variables.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/169243

Changed in horizon:
assignee: nobody → Thai Tran (tqtran)
status: New → In Progress
Thai Tran (tqtran)
description: updated
Changed in horizon:
milestone: none → liberty-1
Thai Tran (tqtran)
summary: - Need horizon in global jshint
+ Adding jshint options to ensure code quality
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/171762

Thai Tran (tqtran)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/176527

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/176529

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/176531

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/176534

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/176535

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/176536

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/176537

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/176541

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/176586

Changed in horizon:
assignee: Thai Tran (tqtran) → Lin Hua Cheng (lin-hua-cheng)
assignee: Lin Hua Cheng (lin-hua-cheng) → Cindy Lu (clu-m)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/176590

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/176598

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/176935

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/176537
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=9f8c35c9e479ebd480a111167cafed4371df665a
Submitter: Jenkins
Branch: master

commit 9f8c35c9e479ebd480a111167cafed4371df665a
Author: Thai Tran <email address hidden>
Date: Wed Apr 22 16:19:45 2015 -0700

    Adding Hogan and Qunit globals to jshint

    Since we are cleaning up legacy, we need to add additional globals to jshint.
    These globals include some 3rd party libraries like Hogan and Qunit.

    Change-Id: I4165b7b4f669ca8f5bd7136ba0e2f58f526d7f4c
    Partial-bug: #1438620

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/176941

Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote :

Marked High. While it arguably isn't a bug in the traditional sense, it's a real problem for developers and reviewers that JSHint in Horizon has quite relaxed rules. Addressing this bug should rectify that, and is a good step in shifting towards a better JS development process.

Changed in horizon:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/176935
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=a3859392c685f4c961789b8de8e6bd6d2fccc0a4
Submitter: Jenkins
Branch: master

commit a3859392c685f4c961789b8de8e6bd6d2fccc0a4
Author: Cindy Lu <email address hidden>
Date: Thu Apr 23 11:23:14 2015 -0700

    Jshint unused and undef cleanup for accordion_nav, tabs JS

    Removing unused and undefined variables in accordion_nav, tabs
    javascript. This ensures that once we enable it globally, the
    gate will not barf.

    Change-Id: I9a8f6c6b71ebc770b4f060ccf4b0b3a1cce8f7d9
    Partial-bug: #1438620

Changed in horizon:
assignee: Cindy Lu (clu-m) → Lin Hua Cheng (lin-hua-cheng)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/176941
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=ac622c597fbb8a5bdb3ebbdc3cbad2fac07f06b4
Submitter: Jenkins
Branch: master

commit ac622c597fbb8a5bdb3ebbdc3cbad2fac07f06b4
Author: Cindy Lu <email address hidden>
Date: Thu Apr 23 11:38:35 2015 -0700

    Jshint unused and undef cleanup for instances JS

    Removing unused and undefined variables in instances javascript.
    This ensures that once we enable it globally, the gate will not barf.

    Change-Id: I2273605986b530a90f29c90a6cd52d628a6d8271
    Partial-bug: #1438620

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/176586
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=13e6ffa666cae92ec93bc07b2bd6880a10ff23ef
Submitter: Jenkins
Branch: master

commit 13e6ffa666cae92ec93bc07b2bd6880a10ff23ef
Author: Cindy Lu <email address hidden>
Date: Wed Apr 22 20:01:02 2015 -0700

    Jshint unused and undef cleanup for firewalls JS

    Removing unused and undefined variables in firewalls javascript.
    This ensures that once we enable it globally, the gate will not barf.

    Change-Id: I32312e5ceff67867b34001a483f378c4df21a2ff
    Partial-bug: #1438620

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/176590
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=7ed405fe14e8498d84b40d8e1537cfa3cbb4bf3f
Submitter: Jenkins
Branch: master

commit 7ed405fe14e8498d84b40d8e1537cfa3cbb4bf3f
Author: Cindy Lu <email address hidden>
Date: Wed Apr 22 20:35:12 2015 -0700

    Jshint unused and undef cleanup for forms, heattop JS

    Removing unused and undefined variables in forms, formset_table,
    heattop javascript. This ensures that once we enable it globally,
    the gate will not barf.

    Change-Id: I3d0b21dd1813fe83f28c2488cd308eee680ed690
    Partial-Bug: #1438620

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/176536
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=3e8499e7143ab3a73de7a60c18ba1ee72d2d0b7f
Submitter: Jenkins
Branch: master

commit 3e8499e7143ab3a73de7a60c18ba1ee72d2d0b7f
Author: Thai Tran <email address hidden>
Date: Wed Apr 22 16:07:41 2015 -0700

    Jshint unused and undef cleanup for tables inline JS

    Removing unused and undefined variables in tables inline javascript.
    This ensures that once we enable it globally, the gate will not barf.

    Change-Id: I88064a4a03d812b4e15b9b6e03caeae3fc6cf159
    Partial-Bug: #1438620

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/176527
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=bb0cb7ccf758156b2b001d94b7e9cb7e5041a272
Submitter: Jenkins
Branch: master

commit bb0cb7ccf758156b2b001d94b7e9cb7e5041a272
Author: Thai Tran <email address hidden>
Date: Wed Apr 22 15:37:53 2015 -0700

    Jshint unused and undef cleanup for membership JS

    Removing unused and undefined variables in membership javascript.
    This ensures that once we enable it globally, the gate will not barf.

    Change-Id: Ia83f43f68d165249b07a11251b080ce7649a7f93
    Partial-Bug: #1438620

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/176531
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=29d4f42e33ba2b0249d98c40d6a08924275569ee
Submitter: Jenkins
Branch: master

commit 29d4f42e33ba2b0249d98c40d6a08924275569ee
Author: Thai Tran <email address hidden>
Date: Wed Apr 22 15:54:11 2015 -0700

    Jshint unused and undef cleanup for modals JS

    Removing unused and undefined variables in modals javascript.
    This ensures that once we enable it globally, the gate will not barf.

    Change-Id: I09b2a456c6f18e1da7f750e2232de4a58bf1fea0
    Partial-Bug: #1438620

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/176541
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=f1443858d94d042a6f71853a87aa8ae88a92259f
Submitter: Jenkins
Branch: master

commit f1443858d94d042a6f71853a87aa8ae88a92259f
Author: Thai Tran <email address hidden>
Date: Wed Apr 22 16:18:30 2015 -0700

    Jshint unused and undef cleanup for tables JS

    Removing unused and undefined variables in tables javascript.
    This ensures that once we enable it globally, the gate will not barf.

    Change-Id: I5123f054c71714b2b7878c929633c85928fcda80
    Partial-Bug: #1438620

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/176529
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=ac277b31c0e82acb5aac236b86296858e639bb6d
Submitter: Jenkins
Branch: master

commit ac277b31c0e82acb5aac236b86296858e639bb6d
Author: Thai Tran <email address hidden>
Date: Wed Apr 22 15:49:45 2015 -0700

    Jshint unused and undef cleanup for messages JS

    Removing unused and undefined variables in messages javascript.
    This ensures that once we enable it globally, the gate will not barf.

    Change-Id: I766951bb20c9ebb562ef35fc0fb2559fb430bd94
    Partial-Bug: #1438620

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/176534
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=1ff3a4c03d97f95124f36b2ac803a2290ca9175c
Submitter: Jenkins
Branch: master

commit 1ff3a4c03d97f95124f36b2ac803a2290ca9175c
Author: Thai Tran <email address hidden>
Date: Wed Apr 22 15:59:42 2015 -0700

    Jshint unused and undef cleanup for networktopology JS

    Removing unused and undefined variables in networktopology javascript.
    This ensures that once we enable it globally, the gate will not barf.

    Change-Id: Ia071199aef0f65fb56fe70475e8a47f89d8f9084
    Partial-Bug: #1438620

Changed in horizon:
assignee: Lin Hua Cheng (lin-hua-cheng) → Cindy Lu (clu-m)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/176535
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=09b8bee4c4ef6ef03b3d3732e7fab3f7444f0cb0
Submitter: Jenkins
Branch: master

commit 09b8bee4c4ef6ef03b3d3732e7fab3f7444f0cb0
Author: Thai Tran <email address hidden>
Date: Wed Apr 22 16:04:56 2015 -0700

    Jshint unused and undef cleanup for quota JS

    Removing unused and undefined variables in quota javascript.
    This ensures that once we enable it globally, the gate will not barf.

    Change-Id: I1a6916607b7ef5af8bf6b459dbf8c4b438a1ac51
    Partial-bug: #1438620

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/176598
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=55eea4436dcb649c2ddce012cab3916849e0505c
Submitter: Jenkins
Branch: master

commit 55eea4436dcb649c2ddce012cab3916849e0505c
Author: Cindy Lu <email address hidden>
Date: Wed Apr 22 20:50:16 2015 -0700

    Jshint unused and undef cleanup for D3 JS

    Removing unused and undefined variables in D3 javascript.
    This ensures that once we enable it globally, the gate will not barf.

    Change-Id: I054bdd17d32c26b21fb0aba4656aef61c81c9d66
    Partial-bug: #1438620

Changed in horizon:
assignee: Cindy Lu (clu-m) → Thai Tran (tqtran)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/169243
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=328cd20a1bf5d76497f85844882d03d71f762d16
Submitter: Jenkins
Branch: master

commit 328cd20a1bf5d76497f85844882d03d71f762d16
Author: Thai Tran <email address hidden>
Date: Tue Apr 28 09:15:33 2015 -0700

    Adding unused, undef, and fail to jshint

    Adding detection for unused variables for general code cleanup.
    Adding detection for using undefined variables for spotting
    leaking and mistyped variables.

    Also cleaned remaining files.

    Change-Id: I5cc4e3168c0836a56e7799f589e384241168354f
    Closes-bug: #1438620

Changed in horizon:
status: In Progress → Fix Committed
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: liberty-1 → 8.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.