You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you use ast-grep as LSP, you are not informed when the linting is not performed due to an invalid rule. Took me a while to come up with the idea to try ast-grep scan in the terminal, which revealed that an invalid rule was the cause:
> ast-grep scan
Error: Cannot parse rule {...}/short-var-names.yml
Help: The file is not a valid ast-grep rule. Please refer to doc and fix the error.
See also: https://ast-grep.github.io/guide/rule-config.html
✖ Caused by
╰▻ Fail to parse yaml as RuleConfig
╰▻ missing field `id` at line 11 column 1
I'd suggest displaying a diagnostic at line one with the info "invalid rule...", to inform the user why no linting is taking place.
The text was updated successfully, but these errors were encountered:
Nonetheless, I think simply adding a diagnostic stating "config invalid" would already help a lot, and that could be done without any changes on lsp client side?
When you use ast-grep as LSP, you are not informed when the linting is not performed due to an invalid rule. Took me a while to come up with the idea to try
ast-grep scan
in the terminal, which revealed that an invalid rule was the cause:I'd suggest displaying a diagnostic at line one with the info "invalid rule...", to inform the user why no linting is taking place.
The text was updated successfully, but these errors were encountered: