Open Bug 1356322 Opened 5 years ago Updated 5 years ago

[eslint] Reduce the cyclomatic complexity in browser/components

Categories

(Firefox :: General, enhancement)

enhancement
Not set
normal

Tracking

()

ASSIGNED

People

(Reporter: squib, Assigned: squib)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Currently, we set the max cyclomatic complexity for browser/components/* to be 70 because of BG__migrateUI. We should just make an exception for this function rather than the entire subdirectory.
Comment on attachment 8858880 [details]
Bug 1356322 - [eslint] Reduce the cyclomatic complexity in browser/components/

https://reviewboard.mozilla.org/r/130868/#review133496

This is fine with me but please run this by Standard8 so that he knows about this change in direction.

::: commit-message-05c21:1
(Diff revision 1)
> +Bug 1356322 - [eslint] Reduce the cyclomatic complexity in browser/components  r?jaws

This comment is a little too broad. It is reducing it but it's not explaining why or how. This needs to be more specific before this patch lands. See https://groups.google.com/forum/#!topic/mozilla.dev.platform/qERnoJniCds
Attachment #8858880 - Flags: review?(jaws) → review+
Attachment #8858880 - Flags: review?(standard8)
Comment on attachment 8858880 [details]
Bug 1356322 - [eslint] Reduce the cyclomatic complexity in browser/components/

https://reviewboard.mozilla.org/r/130868/#review133912

::: commit-message-05c21:1
(Diff revision 2)
> +Bug 1356322 - [eslint] Reduce the cyclomatic complexity in browser/components/  r?jaws

I would change this slightly to "Reduce the maximum allowed cyclomatic..."

::: browser/components/nsBrowserGlue.js:205
(Diff revision 2)
>      Cu.import("resource://services-sync/main.js");
>      Weave.Service.scheduler.delayedAutoConnect(delay);
>    },
>  
>    // nsIObserver implementation
> +  // eslint-disable-next-line complexity

Please can you file bugs for these 4 disabling, so that we can get a recorded discussion/decision as to if we are going to work to reduce the complexity of them or not.

Bonus points for adding bug references in the comments.
Attachment #8858880 - Flags: review?(standard8) → review+
See Also: → 1358949
I wasted precious time on this again in bug 1363118.
You need to log in before you can comment on or make changes to this bug.