Closed Bug 1698838 Opened 4 years ago Closed 4 years ago

Create a convenience `mach format` alias to run formatters in mozlint

Categories

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

enhancement

Tracking

(firefox89 fixed)

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: ahal, Assigned: nisargkarun1997)

Details

Attachments

(1 file)

We currently have a whole bunch of formatters (rustfmt, clang-format, black, etc) that are integrated alongside our linters via mach lint. They can typically be run via ./mach lint --fix. This system works well for us, but it might cause a bit of confusion as developers can have different expectations of linters vs formatters (see discussion in bug 1511122).

I think it would be nice to have a simple wrapper around ./mach lint (similar to mach eslint). This alias would simply dispatch to ./mach lint --fix -l black -l rustfmt -l clang-format ..., but provides a clearer way for developers to run code formatters on their modules.

Assignee: nobody → nisargkarun1997
Status: NEW → ASSIGNED
Pushed by ahalberstadt@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e3ca46df0dd3 Create a format command as an alternative to lint --fix. r=ahal
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
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: