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

Extend the config validator to list issues with locations #246

Open
scripthunter7 opened this issue Feb 25, 2025 · 0 comments
Open

Extend the config validator to list issues with locations #246

scripthunter7 opened this issue Feb 25, 2025 · 0 comments
Assignees
Labels
Priority: P4 T: Config Configuration related

Comments

@scripthunter7
Copy link
Member

scripthunter7 commented Feb 25, 2025

Currently, the config validator throws an error if the config is invalid. However, we can enhance it by assigning exact locations to the errors and linking these locations to specific error messages. This would enable the VSCode extension to highlight configuration issues directly in the editor. Reference: AdguardTeam/VscodeAdblockSyntax#146

For this, it may be necessary to replace the YAML parser with the following one: https://www.npmjs.com/package/yaml.

For parsing JSON with locations, we should take a look at https://www.npmjs.com/package/@humanwhocodes/momoa or https://www.npmjs.com/package/json-to-ast

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: P4 T: Config Configuration related
Projects
None yet
Development

No branches or pull requests

3 participants