Closed Bug 1551078 Opened 4 months ago Closed 3 months ago

Add support of rustfmt in mozlint

Categories

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

task
Not set

Tracking

(firefox69 fixed)

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: sylvestre, Assigned: sylvestre)

References

Details

Attachments

(1 file)

I think we should extend mozlint instead of creating yet a new infra (bug 1369792).
Two use cases.
Show the errors:

$ ./mach lint -l rustfmt js/rust/src/rust.rs

Update the code:

$ ./mach lint -l rustfmt js/rust/src/rust.rs --fix

To use it:

$ rustup component add rustfmt
$ export PATH=$PATH:~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/

(will be improved later)

This could be copied for black and prettier

Two use cases:

  1. Show the errors
    $ ./mach lint -l rustfmt js/rust/src/rust.rs

  2. Update the code
    $ ./mach lint -l rustfmt js/rust/src/rust.rs --fix

Depends on: 1552897
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/06fd76912201
Add rustfmt as part of mozlint r=ahal
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Depends on: 1554111
Duplicate of this bug: 1369792
Depends on: 1554115
See Also: → 1555560
You need to log in before you can comment on or make changes to this bug.