-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parserErrorDetail: fix '^' location of lines starting with tabs
Fixes #1129 for the most part. What still is wrongly put, but also harder to fix, is the case where there's tabs INSIDE the line: p = TAB true TAB { TAB as } or a space before the tab, like SPACE TAB p = true { as } will still have a misaligned "^", as in that case, not all tabs are fully expanded. This merely trims leading tabs, and fixes the error maker location if there's no other tabs used in the line. However, that should fit common usage: Leading tabs is what `opa fmt` proposes; and I'm doubtful of too many uses of tabs in other places in Rego code. Signed-off-by: Stephan Renatus <srenatus@chef.io>
- Loading branch information
Showing
2 changed files
with
33 additions
and
1 deletion.
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