Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix #7885] Re-use LineLengthHelp for statement modifiers
There's no reason to have two implementations of the same logic. They weren't exactly the same, but I think the one in LineLengthHelp was correct, apart from falling back to Layout/IndentationWidth:Width if Layout/IndentationStyle:IndentationWidth is nil, which is now added to match the description of the Layout/IndentationStyle parameters in default.yml. Added some examples on line length with tabs indentation in line_length_spec.rb. Updated if_unless_modifier_spec to cover the fallback on Layout/IndentationWidth:Width better, and removed an example that could not happen in real execution ("without any IndentationWidth config"). The spec examples now work like before, but without requiring Layout/IndentationStyle to be disabled.
- Loading branch information
Showing
6 changed files
with
42 additions
and
53 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
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