-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This was caused by the incorrect location reporting for variables. If the code above is 4-indented, and then location of the name is used, that name is also 4-indented, code flags as misleading. As an example: ```Chapel for 1..10 do writeln("Hello, world!"); var unrelated = "hi"; ``` Note that `unrelated` and `writeln` happen to be aligned, which is sufficient for the false positive. Reported by @alvaradoo -- thanks! The solution is to steal the logic from IncorrectIndentation that avoids AST nodes that report their locations oddly. Reviewed by @jabraham17 -- thanks! ## Testing - [x] `start_test test/chplcheck`.
- Loading branch information
Showing
3 changed files
with
40 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters