Closed Bug 1554894 Opened 5 years ago Closed 4 years ago

Simplify devtools/client/shared/source-utils.js and remove eslint-disable complexity

Categories

(DevTools :: Debugger, task, P5)

task

Tracking

(firefox75 fixed)

RESOLVED FIXED
Firefox 75
Tracking Status
firefox75 --- fixed

People

(Reporter: pbro, Assigned: aarushivij)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug)

Attachments

(2 files)

This file contains a special eslint comment to temporarily disable the complexity eslint rule since it contains one or more functions that exceed the maximum complexity threshold. The code should be simplified, and the comment removed. Link to the code in question: https://searchfox.org/mozilla-central/search?q=eslint-disable+complexity&case=false&regexp=false&path=devtools%2Fclient%2Fshared%2Fsource-utils.js

Component: General → Debugger
Keywords: good-first-bug
Priority: -- → P5

Hi, Can I take this bug? This will be my first contribution (:

Go for it

Thanks I will start working on this

Hi, sorry for not updating I have been busy at work. Quick Question is there a reason why this code was written this way? Instead of maybe using startsWith() or using an auxiliary function?

Hello! :)

I'm wondering what's next after sending the code review. Let me know if I'm still missing something.

Have a great day!

Flags: needinfo?(jlaster)

Hi, sorry. we were traveling last week. I'll review shortly

Flags: needinfo?(jlaster)

Hello
Can I take this issue?
Aarushi :)

Also the link mentioned in comment1 does show any file.
Can you please guide through the issue
Thanks

Thank you for your interest. I've assigned the bug to you now.
You are right, the link has expired. Here's the exact line that we want to remove: https://searchfox.org/mozilla-central/rev/3a0a8e2762821c6afc1d235b3eb3dde63ad3b01a/devtools/client/shared/source-utils.js#259

The idea is to simplify the code in that function so that ESLint does not warn about the function being too complex anymore, so that we can remove the comment.

Assignee: nobody → aarushivij
Status: NEW → ASSIGNED

Thanks Patrick for assigning to me.
Shall get back to you soon.
Aarushi Vij

Pushed by pbrosset@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a423e28bd0fb
Simplify devtools/client/shared/source-utils.js and remove eslint-disable complexity r=pbro
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 75
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: