-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update E999
to show all syntax errors
#11900
Conversation
96968ba
to
4dd412e
Compare
E999
to show all syntax errors
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
E999 | 1 | 1 | 0 | 0 | 0 |
Linter (preview)
ℹ️ ecosystem check detected linter changes. (+1 -0 violations, +0 -0 fixes in 1 projects; 49 projects unchanged)
demisto/content (+1 -0 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
+ Packs/ThreatQ/Integrations/ThreatQ/ThreatQ.py:325:8: E999 SyntaxError: Multiple exception types must be parenthesized
Changes by rule (1 rules affected)
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
E999 | 1 | 1 | 0 | 0 | 0 |
Formatter (stable)
✅ ecosystem check detected no format changes.
Formatter (preview)
✅ ecosystem check detected no format changes.
pycodestyle::rules::syntax_error(&mut diagnostics, parse_error, locator); | ||
for parse_error in parse_errors { | ||
pycodestyle::rules::syntax_error(&mut diagnostics, parse_error, locator); | ||
} | ||
// TODO(dhruvmanila): Remove this clone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the TODO :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#11903 ;)
4dd412e
to
7b7e6b2
Compare
Summary
This PR updates the linter to show all the parse errors as diagnostics instead of just the first one.
Note that this doesn't affect the parse error displayed as error log message. This will be removed in a follow-up PR.
Breaking?
I don't think this is a breaking change even though this might give more diagnostics. The main reason is that this shouldn't affect any users because it'll only give additional diagnostics in the case of multiple syntax errors.
Test Plan
Add an integration test case which would raise more than one parse error.