mrtazz / checkmake

experimental linter/analyzer for Makefiles
MIT License
1.04k stars 45 forks source link

write formatter for syntastic compatible output #14

Open mrtazz opened 8 years ago

mrtazz commented 8 years ago

this would be awesome to integrate with vim and syntastic

Seirdy commented 4 years ago

Making the output GCC-compatible (like mypy and shellcheck -f gcc) would allow easy integration with many tools beyond syntastic.

The GCC output format is %filename:%line:%column: %severity: %message. Severity isn't too important; we can start by simply labeling everything as warning

wesley-dean-flexion commented 2 years ago

@Seirdy Would something like this work:

checkmake "/path/to/Makefile" --format="/path/to/Makefile:{{ .LineNumber }}:0: warning {{ .Rule }}:{{ .Violation }}
"

(note the closing double quote is on a separate line intentionally; otherwise, it all prints on one line (even if '\n' or "\n" is included in the format string)