streetsidesoftware / cspell

A Spell Checker for Code!
https://cspell.org
MIT License
1.17k stars 84 forks source link

Provide SARIF Output report ? #2083

Open nvuillam opened 2 years ago

nvuillam commented 2 years ago

Hi, is it in the roadmap to make cspell provide SARIF output ? (SARIF is the OASIS common format for all analysis tools )

It would help improve its integration within MegaLinter :)

Best regards

nschonni commented 2 years ago

It looks pretty C# specific still https://sarifweb.azurewebsites.net/#ToolsLibraries

nvuillam commented 2 years ago

Microsoft is at the origin of the format, but it is now maintained by OASIS, and widely adopter by all kinds of analyzers, as you can see in the following table :) (orange badges)

https://megalinter.github.io/v6-alpha/supported-linters/

Jason3S commented 2 years ago

@nvuillam,

The spell checker supports custom reporters. See cspell/packages/cspell-json-reporter · streetsidesoftware/cspell for an example.

Depending upon the SARIF format, it should not be too hard to make one. I'm open for a Pull Request to add it.

nvuillam commented 2 years ago

I'm currently directly working a lot of MegaLinter, but why not someday :)

If it's ok let's keep this issue open so maybe someone will want to take it ^^

nvuillam commented 2 years ago

There is now node-sarif-builder available to easily build SARIF reports, if you (or a contributor) are interested :)

Jason3S commented 2 years ago

There is now node-sarif-builder available to easily build SARIF reports, if you (or a contributor) are interested :)

Cool.

nschonni commented 2 years ago

FYI @shaopeng-gh since you seem to be opening similar issues on other repos lately, but with an offer of actually supplying code