Closed Bug 1551078 Opened 6 years ago Closed 6 years ago

Add support of rustfmt in mozlint

Categories

(Developer Infrastructure :: Lint and Formatting, task)

task
Not set
normal

Tracking

(firefox69 fixed)

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: Sylvestre, Assigned: Sylvestre)

References

(Blocks 2 open bugs, Regressed 1 open bug)

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
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Depends on: 1554111
Depends on: 1554115
Depends on: 1606168
Depends on: 1615903
Blocks: 1617369
Blocks: rustfmt
Regressions: 1637669
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: