nccgroup / sobelow

Security-focused static analysis for the Phoenix Framework
Apache License 2.0
1.66k stars 92 forks source link

Swap order of the compact report entries #80

Closed hauleth closed 3 years ago

hauleth commented 3 years ago

Currently the format is:

{report} - {file}:{line}

Which makes it hard to automatically parse (for example using Vim's errorformat. It would be much easier to have such format printed as:

{file}:{line} - {report}

Which would make that much simpler. It would also add support for tools like Reviewdog for having reports in other tools, that currently do not support SARIF format (additionally SARIF format do not support streaming, which can be troublesome sometimes).

GriffinMB commented 3 years ago

I'll add a new flag that reverses the compact output. Let me know if you have any thoughts on naming, otherwise I'll go with something like "rcompact"

hauleth commented 3 years ago

Or make it {file}:{line}: {report} and call it flycheck. This is the naming the Credo uses.

GriffinMB commented 3 years ago

I added a flycheck format (and --flycheck flag) that reverses the compact output. You can install with mix escript.install github nccgroup/sobelow and test it out.

GriffinMB commented 3 years ago

This is in the latest release! Thanks again