Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix an incorrect auto-correct for
Layout/DotPosition
This PR fixes the following incorrect auto-correct for `Layout/DotPosition` when using only dot line. ```console % cat example.rb foo .bar . baz % rubocop --only Layout/DotPosition -a (snip) Inspecting 1 file C Offenses: example.rb:3:3: C: [Corrected] Layout/DotPosition: Place the . on the next line, together with the method name. . ^ 1 file inspected, 1 offense detected, 1 offense corrected ``` ## Before ```consle % cat example.rb foo .bar .baz % ruby -c example.rb example.rb:4: syntax error, unexpected '.', expecting end-of-input .baz ``` ## After ```console % cat example.rb foo .bar .baz % ruby -c example.rb Syntax OK ```
- Loading branch information
Showing
3 changed files
with
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* [#9867](https://github.com/rubocop/rubocop/pull/9867): Fix an incorrect auto-correct for `Layout/DotPosition` when using only dot line. ([@koic][]) |
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