Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/goanalysis/position.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func GetFilePositionFor(fset *token.FileSet, p token.Pos) token.Position {
func EndOfLinePos(f *token.File, line int) token.Pos {
var end token.Pos

if line == f.LineCount() {
if line >= f.LineCount() {
// missing newline at the end of the file
end = f.Pos(f.Size())
} else {
Expand Down
2 changes: 1 addition & 1 deletion pkg/golinters/gofumpt/testdata/gofumpt.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ import "fmt"

func GofumptNewLine() {
fmt.Println( "foo" ) // want "File is not properly formatted"
}
} // want "File is not properly formatted"
Loading