Closed Bug 1623767 Opened 5 years ago Closed 5 years ago

Clippy lint leaves tons of untracked files in the repo

Categories

(Developer Infrastructure :: Lint and Formatting, defect, P3)

defect

Tracking

(firefox77 fixed)

RESOLVED FIXED
mozilla77
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?

Good first bug, not trivial but should not be too hard.
Happy to mentor it. I will fix it otherwise

Mentor: sledru
Keywords: good-first-bug
Regressed by: 1361341
Whiteboard: [lang=rust][lang=python]
Has Regression Range: --- → yes
Keywords: regression

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.

you should look at clippy's options to see if there is an autoremove or run a clean option from clippy :)

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?

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: nobody → yalyna.ts
Status: NEW → ASSIGNED
Attachment #9141514 - Attachment description: Bug 1623767 - Clippy lint leaves tons of untracked files in the repo,r=sylvestre → Bug 1623767 - Remove untracked files in the repo created by clippy r=sylvestre
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/899195086888 Remove untracked files in the repo created by clippy r=sylvestre
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: