-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support to cuddling if used anywhere in block
- Loading branch information
Showing
8 changed files
with
181 additions
and
39 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
33 changes: 17 additions & 16 deletions
33
testdata/src/with_config/no_check_decl/no_check_decl.go.golden
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 |
---|---|---|
@@ -1,22 +1,23 @@ | ||
package testpkg | ||
|
||
func fn1() { | ||
var a = 1 | ||
var b = 2 | ||
const c = 3 | ||
const d = 4 | ||
import "fmt" | ||
|
||
func Fn() {} | ||
|
||
func fn1() { | ||
a := 1 | ||
if true { | ||
_ = 1 | ||
fmt.Println(a) | ||
} | ||
|
||
e := 5 | ||
var f = 6 | ||
g := 7 | ||
b := 2 | ||
for range make([]int, 10) { | ||
_ = 1 | ||
if false { | ||
Fn() | ||
|
||
_ = a | ||
_ = b | ||
_ = c | ||
_ = d | ||
_ = e | ||
_ = f | ||
_ = g | ||
Fn(b) | ||
} | ||
} | ||
} | ||
|
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 Fn(_ int) {} | ||
|
||
func fn1() { | ||
a := 1 | ||
if true { | ||
if false { | ||
b := 2 | ||
if true { // want "missing whitespace decreases readability" | ||
Fn(a) | ||
} | ||
|
||
_ = b | ||
} | ||
} | ||
|
||
y := 2 | ||
if true { // want "missing whitespace decreases readability" | ||
if false { | ||
a = 1 | ||
if true { | ||
Fn(a) | ||
} | ||
} | ||
} | ||
|
||
i := 0 | ||
if true { | ||
_ = 1 | ||
_ = 2 | ||
_ = 3 | ||
|
||
i++ | ||
} | ||
|
||
_ = x | ||
_ = y | ||
} |
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,41 @@ | ||
package testpkg | ||
|
||
func Fn(_ int) {} | ||
|
||
func fn1() { | ||
a := 1 | ||
if true { | ||
if false { | ||
b := 2 | ||
|
||
if true { // want "missing whitespace decreases readability" | ||
Fn(a) | ||
} | ||
|
||
_ = b | ||
} | ||
} | ||
|
||
y := 2 | ||
|
||
if true { // want "missing whitespace decreases readability" | ||
if false { | ||
a = 1 | ||
if true { | ||
Fn(a) | ||
} | ||
} | ||
} | ||
|
||
i := 0 | ||
if true { | ||
_ = 1 | ||
_ = 2 | ||
_ = 3 | ||
|
||
i++ | ||
} | ||
|
||
_ = x | ||
_ = y | ||
} |
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