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

Validate file on save or as a seperate command #11

Open
raspi opened this issue Mar 23, 2021 · 0 comments
Open

Validate file on save or as a seperate command #11

raspi opened this issue Mar 23, 2021 · 0 comments

Comments

@raspi
Copy link
Contributor

raspi commented Mar 23, 2021

You can validate the rule file with nft -c -f /path/to/rules.nft which doesn't commit the rules, only checks.
So maybe add validation option to extension configuration JSON file? Something like {"checkOnSave": true}.
Extra bonus: capture the stdout/stderr of that command and if the rules are not valid, go to the offending line in VSCode.

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

No branches or pull requests

2 participants