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
This came up while developing #24735. The 'private' keyword doesn't seem to be included in the location of the function, which causes false positives when trying to validate indentation.
If/when this is closed, consider removing the special case in chplcheck's rules.py that works around this issue.
The text was updated successfully, but these errors were encountered:
#24830)
This PR does a few things.
1. Fixes a small bug in which `When` was listed to inherit from
`SimpleBlockLike`, but didn't. This led to some segmentation faults /
memory issues when iterating over 'statements' of 'SimpleBlockLike'
nodes.
2. Adjusts the `IncorrectIndentation` rule to skip all private and
public things, because visibility modifiers' locations are not correctly
reported by the parser
(#24818).
3. Adds a new rule for cases like this:
```Chapel
enum {};
```
Previously, `;` (which is unnecessary here and creates a new statement),
would count as a same-line sibling to `enum`, resulting in a warning for
`IncorrectIndentation`. However, the trouble isn't that `;` is
improperly indented, but that it exists at all. Thus, the PR adds a new
linter rule for `;`s where they aren't needed.
Reviewed by @jabraham17 -- thanks!
This came up while developing #24735. The 'private' keyword doesn't seem to be included in the location of the function, which causes false positives when trying to validate indentation.
If/when this is closed, consider removing the special case in
chplcheck
'srules.py
that works around this issue.The text was updated successfully, but these errors were encountered: