Closed Bug 1361341 Opened 8 years ago Closed 5 years ago

Add rust clippy to mozlint

Categories

(Developer Infrastructure :: Lint and Formatting, enhancement, P1)

enhancement

Tracking

(firefox75 fixed)

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: bc, Assigned: Sylvestre)

References

(Depends on 4 open bugs, Blocks 1 open bug)

Details

Attachments

(2 files, 7 obsolete files)

Track work necessary to get in tree Rust linting implmented.
Depends on: clippy
Depends on: 1361343
Depends on: 1361345
Just wanted to mention that I had previously looked into this, but using rustfmt (with the checkstyle option) instead: https://github.com/rust-lang-nursery/rustfmt But if the rust devs prefer clippy, we should definitely go with that. The only thing I'd ask is to consider somehow integrating this with mozlint: http://gecko.readthedocs.io/en/latest/tools/lint/index.html While rustfmt would be easy to integrate with mozlint, clippy would be trickier as it is a compiler extension. So I'm not 100% sure if integration makes sense in this case, or if we should make a brand new thing. And even if mozlint isn't the right fit for this, we could still re-use the existing |mach lint| mach command. Anyway, just something to consider. I'm not back until the 23rd, but I'd be happy to discuss/answer questions either here or via e-mail until then.
Doing some bug cleanup. Once we have clippy support for rust stable, I don't think this will need more than one bug to complete, so I'm just turning this into the bug that will implement clippy as a mozlint linter. Doing this will also automatically provide the mach command, so would make bug 1361343 invalid.
Summary: [meta] tracking work to Implement in tree rust linting → Add rust clippy to mozlint
Priority: -- → P3
Product: Testing → Firefox Build System
Priority: P3 → P1
Summary: Add rust clippy to mozlint → [meta] Add rust clippy to mozlint
Blocks: clippy
No longer depends on: clippy
Keywords: meta
Summary: [meta] Add rust clippy to mozlint → Add rust clippy to mozlint
Blocks: 1578058

clippy cannot run on a single file. it needs to build the file
It can be built using:
cargo clippy --manifest-path js/src/wasm/cranelift/Cargo.toml

Assignee: nobody → sledru

Depends on D58248

Depends on D58250

Depends on D58251

Attachment #9117783 - Attachment is obsolete: true
Attachment #9117784 - Attachment is obsolete: true

Depends on D58252

Otherwise, cargo isn't installed

Depends on D58267

Depends on: 1606073
Depends on: 1606077

Comment on attachment 9117786 [details]
Bug 1361341 - Add clippy in the mozlint docker image

Revision D58251 was moved to bug 1578058. Setting attachment 9117786 [details] to obsolete.

Attachment #9117786 - Attachment is obsolete: true

Comment on attachment 9117787 [details]
Bug 1361341 - Run clippy in taskcluster

Revision D58252 was moved to bug 1578058. Setting attachment 9117787 [details] to obsolete.

Attachment #9117787 - Attachment is obsolete: true

Comment on attachment 9117813 [details]
Bug 1361341 - TC: Create a new lint/rust category

Revision D58267 was moved to bug 1578058. Setting attachment 9117813 [details] to obsolete.

Attachment #9117813 - Attachment is obsolete: true
Attachment #9117814 - Attachment description: Bug 1361341 - Ride along: move the mozlint task in the file with the same name → Bug 1578058 - Ride along: move the mozlint task in the file with the same name

Comment on attachment 9117814 [details]
Bug 1578058 - Ride along: move the mozlint task in the file with the same name

Revision D58268 was moved to bug 1578058. Setting attachment 9117814 [details] to obsolete.

Attachment #9117814 - Attachment is obsolete: true
Attachment #9117785 - Attachment description: Bug 1361341 - Add rust clippy to mozlint → Bug 1361341 - Add rust clippy to mozlint r?ahal
Attachment #9117875 - Attachment description: Bug 1361341 - Create the list of supported/unsupported directory with clippy → Bug 1361341 - Create the list of supported/unsupported directory with clippy r?ahal
Attachment #9117785 - Attachment description: Bug 1361341 - Add rust clippy to mozlint r?ahal → Bug 1361341 - Add rust clippy to mozlint r?#linter-reviewers
Attachment #9117875 - Attachment description: Bug 1361341 - Create the list of supported/unsupported directory with clippy r?ahal → Bug 1361341 - Create the list of supported/unsupported directory with clippy r?#linter-reviewers
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/066a58eea385 Add rust clippy to mozlint r=ahal https://hg.mozilla.org/integration/autoland/rev/76d91acac82c Create the list of supported/unsupported directory with clippy r=ahal

Instead of python.yml
Otherwise, it is getting the incorrect docker image (without rust).
And it makes sense that the mozlint job is next to the other tasks

Depends on D58293

Depends on: 1615903
Attachment #9126968 - Attachment is obsolete: true
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1131a9b0f8c0 Add rust clippy to mozlint r=ahal https://hg.mozilla.org/integration/autoland/rev/2a33639bf079 Create the list of supported/unsupported directory with clippy r=ahal
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
Depends on: 1616761

It landed!

Flags: needinfo?(sledru)
Regressions: 1623767
Depends on: 1644799
Depends on: 1644809
Depends on: 1676513
Depends on: 1699661
Depends on: 1699662
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: