Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(parser): add a common SARIF parser and use it for checkstyle #718

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kmoschcau
Copy link
Contributor

This adds a SARIF parser and uses it for
checkstyle.

@kmoschcau
Copy link
Contributor Author

I just realized, that for_sarif likely needs some documentation in the README. I can add that tomorrow. Also I'm not sure where to put the spec for this parsing function. I didn't get the test runner working so far either. Any help with that would be appreciated.

kmoschcau added a commit to kmoschcau/nvim-config that referenced this pull request Jan 4, 2025
@mfussenegger
Copy link
Owner

mfussenegger commented Jan 5, 2025

Thanks, overall seems good to me to add sarif support.

Also I'm not sure where to put the spec for this parsing function

I'd keep the checkstyle spec but adapt the input to the sarif output.

. I didn't get the test runner working so far either. Any help with that would be appreciated.

See https://github.com/nvim-lua/nvim-lua-plugin-template?tab=readme-ov-file#run-tests

To help further I'd need to know exact errors.

lua/lint/parser.lua Outdated Show resolved Hide resolved
lua/lint/parser.lua Outdated Show resolved Hide resolved
@kmoschcau
Copy link
Contributor Author

OK I got the tests working on a Linux machine. Something tries to run ~ as an executable on Windows, which of course fails.

@kmoschcau
Copy link
Contributor Author

I addressed all comments and added a comprehensive spec file for the for_sarif parser. This includes the checkstyle tests and adds some additional ones.

@kmoschcau
Copy link
Contributor Author

I found a bug with checkstyle on Windows, when using the SARIF format: checkstyle/checkstyle#16127
Up to you, if you want to hold this PR back until this is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants