
The whitespace linter was added in #673. Enable it and fix found issues. Add auto-fixing to the whitespace linter.
44 lines
489 B
Go
44 lines
489 B
Go
//args: -Ewhitespace
|
|
package p
|
|
|
|
import "fmt"
|
|
|
|
func oneLeadingNewline() {
|
|
fmt.Println("Hello world")
|
|
}
|
|
|
|
func oneNewlineAtBothEnds() {
|
|
fmt.Println("Hello world")
|
|
}
|
|
|
|
func noNewlineFunc() {
|
|
}
|
|
|
|
func oneNewlineFunc() {
|
|
|
|
}
|
|
|
|
func twoNewlinesFunc() {
|
|
|
|
|
|
}
|
|
|
|
func noNewlineWithCommentFunc() {
|
|
// some comment
|
|
}
|
|
|
|
func oneTrailingNewlineWithCommentFunc() {
|
|
// some comment
|
|
|
|
}
|
|
|
|
func oneLeadingNewlineWithCommentFunc() {
|
|
|
|
// some comment
|
|
}
|
|
|
|
func twoLeadingNewlines() {
|
|
|
|
fmt.Println("Hello world")
|
|
}
|