Skip to content

Conversation

@marcoroth
Copy link
Owner

@marcoroth marcoroth commented Oct 10, 2025

This pull request updates the linter to not lint files with syntax errors. This is to avoid false positives that might occur when trying to lint a file that isn't properly parsed, which could also lead to a "parser error" and "lint offense" diagnostic in the LSP.

Additionally, it updates the Linter test helpers to make sure all test cases have valid syntax too. Since we have the no-parser-errors rule we will still catch syntax errors, invalid syntax, and parser errors with that rule in real applications.

@marcoroth marcoroth added feature New feature or request linter labels Oct 10, 2025
@marcoroth marcoroth changed the title Linter: Don't lint files with syntax errors Oct 10, 2025
@marcoroth marcoroth merged commit 87a866a into main Oct 10, 2025
7 checks passed
@marcoroth marcoroth deleted the linter-dont-lint-on-syntax-and-disallow-invalid-syntax-in-tests branch October 10, 2025 19:25
asilano pushed a commit to fac/herb that referenced this pull request Oct 21, 2025
This pull request updates the linter to not lint files with syntax
errors. This is to avoid false positives that might occur when trying to
lint a file that isn't properly parsed, which could also lead to a
"parser error" and "lint offense" diagnostic in the LSP.

Additionally, it updates the Linter test helpers to make sure all test
cases have valid syntax too. Since we have the `no-parser-errors` rule
we will still catch syntax errors, invalid syntax, and parser errors
with that rule in real applications.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request linter

2 participants