Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Test with issues #33

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
29 changes: 29 additions & 0 deletions some/some.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package some

import "log"

func withIssue() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

withIssue is unused

log.Printf("bad format: %s", 1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Printf format %s has arg 1 of wrong type int

}

func withAnotherIssue() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

withAnotherIssue is unused

a := 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File is not goimports-ed

if a != 0 {
return
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if block ends with a return statement, so drop this else and outdent its block

panic(a)
}
}

func testScopeLint() {
Copy link

@golangcibot golangcibot Nov 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testScopeLint is unused (deadcode)

funcs := []func(){}
for _, v := range []int{1, 2} {
funcs = append(funcs, func() {
log.Print(v)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the variable on range scope v in function literal (from scopelint)

})
}

for _, f := range funcs {
f()
}
}