Closed Bug 1646161 Opened 11 months ago Closed 2 months ago

mozlint: add a command to identify when an item can be removed from the exclude list

Categories

(Firefox Build System :: Lint and Formatting, enhancement)

enhancement

Tracking

(firefox88 fixed)

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: Sylvestre, Assigned: nisargkarun1997, Mentored)

References

Details

(Keywords: good-first-bug, Whiteboard: [lang=python])

Attachments

(1 file, 3 obsolete files)

Usually, linters have include/exclude lists.
For example, with clippy, we have a long list of include (good) and a long list of exclude (bad).
Example: https://searchfox.org/mozilla-central/source/tools/lint/clippy.yml

We should add an option (or something similar) to mozlint to identify which items in the exclude list are now green.
It happens when the dev/team in charge of the components fixes some issues (here, clippy warnings but it can be license, coding style, etc) and isn't aware that the folder is listed in the exclude list.

We should add an option to mozlint like "--check-exclude-list" which would run the checker only the exclude list (like -n in mozlint) and shows which directories/files are green and could be removed from the exclude list.

Currently, I should do:

$ ./mach lint -l clippy -n gfx/wgpu/player/ 

for every checkers and every excludes and look at the results to see issues still happen

(I choose this example and this directory happens to be good now)

% ./mach lint -l clippy -n tools/profiler/rust-helper/
/home/sylvestre/dev/mozilla/mozilla-central.hg/tools/profiler/rust-helper/src/lib.rs
  56:46  error  this public function dereferences a raw pointer but is not marked `unsafe`  clippy::not_unsafe_ptr_arg_deref (clippy)
  60:39  error  this public function dereferences a raw pointer but is not marked `unsafe`  clippy::not_unsafe_ptr_arg_deref (clippy)
  88:51  error  this public function dereferences a raw pointer but is not marked `unsafe`  clippy::not_unsafe_ptr_arg_deref (clippy)
  89:49  error  this public function dereferences a raw pointer but is not marked `unsafe`  clippy::not_unsafe_ptr_arg_deref (clippy)

✖ 4 problems (4 errors, 4 warnings)
Mentor: sledru
Keywords: good-first-bug
Whiteboard: [lang=python]
Depends on: 1646162
Assignee: nobody → yalyna.ts

Tania, are you still working on this?

Flags: needinfo?(yalyna.ts)

Gijs, no, I'm not. I got stuck and stopped working on it. Don't think I'll get back to it within the next month for sure.

Flags: needinfo?(yalyna.ts)

This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit auto_nag documentation.

Assignee: yalyna.ts → nobody
Flags: needinfo?(sledru)

@nisargkarun1997 why did you set a needinfo ?

Flags: needinfo?(sledru)

@Sylvestre Ledru I was looking for a good first bug. I found this bug is still active and requested you for additional info or resources which could help in resolving this.

@Sylvestre Ledru Do I need to get separate credentials to push the changes to remote for code review? I am trying to push my changes and getting the following error.

Hi nisargkarun1997, yes you need to add phabricator token locally, you have to type moz-phab install-certificate and then go to url mentioned in terminal and paste the token

Hi, I am new to open source and want to start. If it is still open I am ready to contribute as it looks like interesting.

(In reply to Deepak from comment #9)

Hi, I am new to open source and want to start. If it is still open I am ready to contribute as it looks like interesting.

I guess someone else is working on this bug, can you look into https://codetribute.mozilla.org/ for something else or come back to this bug in few days if there is no progress here feel free to add the patch then

@Shivam Singhal Thanks for the reply.
I have done this and still facing the same issue. I am getting permission denied error repeatedly.

Also Hi @Deepak, I have already been working on this bug for the past week and am about to raise a review request.

(In reply to nisargkarun1997 from comment #11)

@Shivam Singhal Thanks for the reply.
I have done this and still facing the same issue. I am getting permission denied error repeatedly.

Could you please paste the error in https://chat.mozilla.org/#/room/#introduction:mozilla.org then someone will help there, also https://stackoverflow.com/questions/1254619/abort-error-nodename-nor-servname-provided-or-not-known-error

Sure, thank you!

Assignee: nobody → nisargkarun1997
Status: NEW → ASSIGNED

Depends on D105115

Depends on D105133

Depends on D105134

Attachment #9203111 - Attachment is obsolete: true
Attachment #9203110 - Attachment is obsolete: true
Attachment #9203437 - Attachment is obsolete: true
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/222b781eae2e
Add command to run linters for the exclude list r=ahal
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.