Clippy lint leaves tons of untracked files in the repo
Categories
(Developer Infrastructure :: Lint and Formatting, defect, P3)
Tracking
(firefox77 fixed)
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: ahal, Assigned: undef1nd, Mentored)
References
(Regression)
Details
(Keywords: good-first-bug, regression, Whiteboard: [lang=rust][lang=python])
Attachments
(1 file)
STR:
$ hg status
$ ./mach lint -l clippy
$ hg status
? gfx/webrender_bindings/Cargo.lock
? gfx/webrender_bindings/target/.rustc_info.json
? gfx/webrender_bindings/target/debug/.cargo-lock
... and over 3300 more ...
Maybe we can configure clippy not to write these files, or write them to a temporary directory?
Comment 1•5 years ago
|
||
Good first bug, not trivial but should not be too hard.
Happy to mentor it. I will fix it otherwise
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Heya, it looks interesting to me.
I'd like to give it a try. Could you please tell me where I should start from?
Thanks.
Comment 3•5 years ago
|
||
you should look at clippy's options to see if there is an autoremove or run a clean option from clippy :)
Assignee | ||
Comment 4•5 years ago
|
||
Thanks :-)
By default clippy does not seems to create any files after its run, so I was wondering what options it uses now.
As far as I understand clippy command with all the options are generated in here https://hg.mozilla.org/mozilla-central/file/tip/tools/lint/clippy/__init__.py or not really?
Comment 5•5 years ago
|
||
Correct, the args are defined here:
https://searchfox.org/mozilla-central/source/tools/lint/clippy/__init__.py#153-158
Comment 6•5 years ago
|
||
Maybe doing that:
https://searchfox.org/mozilla-central/source/tools/lint/clippy/__init__.py#188-191
again would be enough?
Assignee | ||
Comment 7•5 years ago
|
||
So I got it: clippy leaves build artefacts after its run. Those can be removed with cargo clean after clippy execution.
But there's another problem: it also leaves Cargo.lock, which may or may not be missing for some packages https://searchfox.org/mozilla-central/search?q=cargo.lock thus I guess it needs to be also removed, but only where it's applicable.
Assignee | ||
Comment 8•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 10•5 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•