Enable eslint cyclomatic complexity rule at existing levels

RESOLVED FIXED in Firefox 55

Status

()

Toolkit
General
RESOLVED FIXED
8 months ago
7 months ago

People

(Reporter: standard8, Assigned: standard8)

Tracking

(Blocks: 1 bug)

unspecified
mozilla55
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox55 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

8 months ago
I think a first step towards bug 1326071 is to enable the complexity rule at levels that are currently appropriate for the tree - i.e. set the levels so that we have no failures.

This does two things:

- Stop newer functions being written that are more complex than any existing.
- Stop existing complex functions getting even more complex.

Whilst it'd be good to also reduce the complexity rule maximum to reasonable levels, we can work on that as we progress through bug 1326071. This is a partial improvement until we can get time to work through that one.
Comment hidden (mozreview-request)
This is so awesome. I was looking at this rule a while back and was thinking of implementing some max number of failures so that we can lower that number over time, though I suppose this patch will work.

Comment 3

8 months ago
mozreview-review
Comment on attachment 8848037 [details]
Bug 1347884 - Enable eslint cyclomatic complexity rule at existing levels.

https://reviewboard.mozilla.org/r/121002/#review123058
Attachment #8848037 - Flags: review?(jaws) → review+

Comment 4

8 months ago
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1768ea38ef24
Enable eslint cyclomatic complexity rule at existing levels. r=jaws
(Assignee)

Comment 5

8 months ago
(In reply to (Away 17-Mar) Jared Wein [:jaws] (please needinfo? me) from comment #2)
> This is so awesome. I was looking at this rule a while back and was thinking
> of implementing some max number of failures so that we can lower that number
> over time, though I suppose this patch will work.

Yeah, that's what I was thinking. It is a bit more zoned than I'd like, but at least we can break things down by area & get some smaller bugs created.

Comment 6

8 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/1768ea38ef24
Status: NEW → RESOLVED
Last Resolved: 8 months ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Blocks: 1358949
You need to log in before you can comment on or make changes to this bug.