Closed
Bug 1391699
Opened 7 years ago
Closed 7 years ago
Add eslint rule to catch missing breaks in switches
Categories
(Remote Protocol :: Marionette, enhancement)
Tracking
(firefox57 fixed)
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: ato, Assigned: ato)
Details
Attachments
(1 file)
As a follow-up to https://bugzilla.mozilla.org/show_bug.cgi?id=1254136, we want to eslint to catch missing break statements in switches to avoid similar future bugs.
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → ato
Status: NEW → ASSIGNED
Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8898922 [details] Bug 1391699 - Disallow fallthrough case statements. https://reviewboard.mozilla.org/r/170288/#review175776 ::: testing/marionette/.eslintrc.js:16 (Diff revision 1) > }], > "max-len": ["error", 78, { > "ignoreStrings": true, > "ignoreUrls": true, > }], > + "no-fallthrough": "error", So this only applies when you have at least one line of code for a case? I see a couple of instances when we have fall-throughs but case lines are right after each other.
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8898922 [details] Bug 1391699 - Disallow fallthrough case statements. https://reviewboard.mozilla.org/r/170288/#review175822
Attachment #8898922 -
Flags: review?(dburns) → review+
Assignee | ||
Comment 4•7 years ago
|
||
(In reply to Henrik Skupin (:whimboo) from comment #2) > So this only applies when you have at least one line of code for a > case? I see a couple of instances when we have fall-throughs but > case lines are right after each other. Yes, it assumes this is intentional use of fall through.
Pushed by atolfsen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a5add563d059 Disallow fallthrough case statements. r=automatedtester
Comment 6•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a5add563d059
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Updated•1 year ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•