Open Bug 1389579 Opened 8 years ago Updated 3 years ago

|mach lint| doesn't print the offending line for lint violations

Categories

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

enhancement

Tracking

(Not tracked)

People

(Reporter: erahm, Unassigned)

Details

Calling |mach lint| outputs the 'line:col file' but doesn't actually print the offending line. It would make deciphering what went wrong easier if we included the contents of the line (similar to clang & gcc).
I know that eslint supports programmable output formatters so in theory we could make eslint output whatever we wanted to. It looks like the codeframe formatter might be a better choice: http://eslint.org/docs/user-guide/formatters/#codeframe
We don't actually use the eslint formatters per se. ESlint outputs the json format and mozlint handles the formatting: https://dxr.mozilla.org/mozilla-central/search?q=path:python%2Fmozlint%2Fmozlint%2Fformatters The good news is we can implement this pretty easily. We could either add source context to the stylish formatter (I have a patch lying around that already does this), implement a new codeframe formatter, or both.
Priority: -- → P3
Product: Testing → Firefox Build System
Product: Firefox Build System → Developer Infrastructure
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.