Open Bug 1646161 Opened 4 months ago Updated 1 month 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

(Not tracked)

People

(Reporter: Sylvestre, Assigned: undef1nd, Mentored)

References

Details

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

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)
You need to log in before you can comment on or make changes to this bug.