-
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.
- Loading branch information
Showing
7 changed files
with
245 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package testpkg | ||
|
||
func fn1() { | ||
one := 1 | ||
two := 2 // want "missing whitespace decreases readability" | ||
for i := 0; i < two; i++ { | ||
panic(err) | ||
} | ||
} | ||
|
||
func fn2() { | ||
two := 2 | ||
one := 1 | ||
for i := 0; i < two; i++ { // want "missing whitespace decreases readability" | ||
panic(err) | ||
} | ||
} | ||
|
||
func fn3() { | ||
for i := 0; i < 1; i++ { | ||
panic(err) | ||
} | ||
for i := 0; i < 1; i++ { // want "missing whitespace decreases readability" | ||
panic(err) | ||
} | ||
} |
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,30 @@ | ||
package testpkg | ||
|
||
func fn1() { | ||
one := 1 | ||
|
||
two := 2 // want "missing whitespace decreases readability" | ||
for i := 0; i < two; i++ { | ||
panic(err) | ||
} | ||
} | ||
|
||
func fn2() { | ||
two := 2 | ||
one := 1 | ||
|
||
for i := 0; i < two; i++ { // want "missing whitespace decreases readability" | ||
panic(err) | ||
} | ||
} | ||
|
||
func fn3() { | ||
for i := 0; i < 1; i++ { | ||
panic(err) | ||
} | ||
|
||
for i := 0; i < 1; i++ { // want "missing whitespace decreases readability" | ||
panic(err) | ||
} | ||
} | ||
|
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 | ||
|
||
func fn1() { | ||
one := []int{} | ||
two := []int{} // want "missing whitespace decreases readability" | ||
for range two { | ||
panic(err) | ||
} | ||
} | ||
|
||
func fn2() { | ||
two := []int{} | ||
one := []int{} | ||
for range two { // want "missing whitespace decreases readability" | ||
panic(err) | ||
} | ||
} | ||
|
||
func fn3() { | ||
for range make([]int{}, 0) { | ||
panic(foo) | ||
} | ||
for range make([]int{}, 0) { // want "missing whitespace decreases readability" | ||
panic(bar) | ||
} | ||
} |
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,30 @@ | ||
package testpkg | ||
|
||
func fn1() { | ||
one := []int{} | ||
|
||
two := []int{} // want "missing whitespace decreases readability" | ||
for range two { | ||
panic(err) | ||
} | ||
} | ||
|
||
func fn2() { | ||
two := []int{} | ||
one := []int{} | ||
|
||
for range two { // want "missing whitespace decreases readability" | ||
panic(err) | ||
} | ||
} | ||
|
||
func fn3() { | ||
for range make([]int{}, 0) { | ||
panic(foo) | ||
} | ||
|
||
for range make([]int{}, 0) { // want "missing whitespace decreases readability" | ||
panic(bar) | ||
} | ||
} | ||
|
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,35 @@ | ||
package testpkg | ||
|
||
func fn1() { | ||
one := 1 | ||
two := 2 // want "missing whitespace decreases readability" | ||
switch two { | ||
case 1: | ||
case 2: | ||
case 3: | ||
panic(err) | ||
} | ||
} | ||
|
||
func fn2() { | ||
two := 2 | ||
one := 1 | ||
switch two { // want "missing whitespace decreases readability" | ||
case 1: | ||
case 2: | ||
case 3: | ||
panic(err) | ||
} | ||
} | ||
|
||
func fn3() { | ||
switch true { | ||
case true: | ||
case false: | ||
} | ||
switch true { // want "missing whitespace decreases readability" | ||
case true: | ||
case false: | ||
panic(err) | ||
} | ||
} |
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,39 @@ | ||
package testpkg | ||
|
||
func fn1() { | ||
one := 1 | ||
|
||
two := 2 // want "missing whitespace decreases readability" | ||
switch two { | ||
case 1: | ||
case 2: | ||
case 3: | ||
panic(err) | ||
} | ||
} | ||
|
||
func fn2() { | ||
two := 2 | ||
one := 1 | ||
|
||
switch two { // want "missing whitespace decreases readability" | ||
case 1: | ||
case 2: | ||
case 3: | ||
panic(err) | ||
} | ||
} | ||
|
||
func fn3() { | ||
switch true { | ||
case true: | ||
case false: | ||
} | ||
|
||
switch true { // want "missing whitespace decreases readability" | ||
case true: | ||
case false: | ||
panic(err) | ||
} | ||
} | ||
|
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