Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: ignored nodes in indent rule (fixes #9392)
When a node is ignored by the indent rule, it ought not to matter how it’s indented. But the ignoring of nodes was implemented in such a way that the *type* of indentation (tabs vs spaces) was being checked. For example in "tab" mode, an ignored line indented by four spaces would cause the error “Expected indentation of 4 tabs but found 4 spaces”. In particular, this is a problem with “tabs for indentation, spaces for alignment” styles, where we want to allow code like: var x = 1, y = 2; where the second line is aligned using four spaces. The implementation is taken from @not-an-aardvark’s comment #9393 (review) All tests pass. Fixes #9392.
- Loading branch information
1 parent
786cc73
commit bf7a3ed
Showing
2 changed files
with
48 additions
and
18 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