-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove newline in end of block * Remove newline in start of block (and comments...) This is WIP because we need to preserve the comments so they don't get deleted when we remove beginning of blocks.
- Loading branch information
Showing
8 changed files
with
112 additions
and
78 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package testpkg | ||
|
||
import "fmt" | ||
|
||
func RemoveWhitespaceNoComments() { // want "block should not start with a whitespace" | ||
|
||
a := 1 | ||
if a < 2 { // want "block should not start with a whitespace" | ||
|
||
a = 2 | ||
|
||
} // want "block should not end with a whitespace" | ||
|
||
switch { // want "block should not start with a whitespace" | ||
|
||
case true: | ||
fmt.Println("true") | ||
|
||
default: | ||
fmt.Println("false") | ||
|
||
} // want "block should not end with a whitespace" | ||
|
||
_ = a | ||
|
||
} // want "block should not end with a whitespace" |
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,20 @@ | ||
package testpkg | ||
|
||
import "fmt" | ||
|
||
func RemoveWhitespaceNoComments() { | ||
a := 1 | ||
if a < 2 { | ||
a = 2 | ||
} // want "block should not end with a whitespace" | ||
|
||
switch { | ||
case true: | ||
fmt.Println("true") | ||
|
||
default: | ||
fmt.Println("false") | ||
} // want "block should not end with a whitespace" | ||
|
||
_ = a | ||
} // want "block should not end with a whitespace" |
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