Here is what I came up with:
Firstly,
elm-make
outputs build errors in structured JSON;
$ elm-make --report json src/main.elm
[{"tag":"unused import","overview":"Module `Bootstrap.CDN` is unused.","details":"Best to remove it. Don't save code quality for later!","region":{"start":{"line":3,"column":1},"end":{"line":3,"column":28}},"type":"warning","file":"src/main.elm"}]
Now you can pass this output through jq (see here). reformat it to
elm make src/main.elm --report json --output ./public/app.js | \
jq '.[] | { type: .type, file: .file, line: .region.start.line|tostring, tag: .tag, column: .region.start.column|tostring, tag: .tag, details: .details }' | \
jq --raw-output '. | "[" + (.type|ascii_upcase) + "] " + .file + ":" + .line + ":" + .column + " " + .tag + " -- " + .details + "\n"'
which gives you formatted output;
[WARNING] src/main.elm:9:1 unused import
[WARNING] src/main.elm:17:1 missing type annotation
main : Program Never Model Main.Msg
intellij,
$FILE_PATH$:$LINE$:$COLUMN$ $MESSAGE$
, , .