reviewdog [golangci] report
reported by reviewdog 🐶
Findings (15)
internal/github/action_test.go|17| File is not gofmt
-ed with -s
(gofmt)
internal/github/action.go|130 col 27| G302: Expect file permissions to be 0600 or less (gosec)
internal/slice/slice.go|21 col 1| exported: exported function StartsWithAnyOf should have comment or be unexported (revive)
internal/github/action.go|82 col 6| type specified
is unused (unused)
internal/github/pullrequest/labels.go|7 col 2| import 'github.com/agilepathway/label-checker/internal/error/panic' is not allowed from list 'Main' (depguard)
internal/github/pullrequest/labels.go|8 col 2| import 'github.com/agilepathway/label-checker/internal/slice' is not allowed from list 'Main' (depguard)
internal/github/pullrequest/pull_request.go|9 col 2| import 'github.com/agilepathway/label-checker/internal/error/panic' is not allowed from list 'Main' (depguard)
internal/github/pullrequest/pull_request.go|10 col 2| import 'github.com/shurcooL/githubv4' is not allowed from list 'Main' (depguard)
label_checker.go|7 col 2| import 'github.com/agilepathway/label-checker/internal/github' is not allowed from list 'Main' (depguard)
internal/github/action.go|16 col 2| import 'github.com/agilepathway/label-checker/internal/error/panic' is not allowed from list 'Main' (depguard)
internal/github/action.go|17 col 2| import 'github.com/agilepathway/label-checker/internal/github/pullrequest' is not allowed from list 'Main' (depguard)
internal/github/action.go|11 col 2| SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package [io] or package [os], and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
internal/github/pullrequest/labels.go|32 col 2| return statements should not be cuddled if block has more than two lines (wsl)
internal/github/action_test.go|272 col 2| return statements should not be cuddled if block has more than two lines (wsl)
internal/github/action_test.go|158 col 4| expressions should not be cuddled with blocks (wsl)
Filtered Findings (0)
Annotations
Check failure on line 17 in internal/github/action_test.go
github-actions / golangci
[golangci] internal/github/action_test.go#L17
File is not `gofmt`-ed with `-s` (gofmt)
Raw output
internal/github/action_test.go:17: File is not `gofmt`-ed with `-s` (gofmt)
//nolint: gochecknoglobals
Check failure on line 130 in internal/github/action.go
github-actions / golangci
[golangci] internal/github/action.go#L130
G302: Expect file permissions to be 0600 or less (gosec)
Raw output
internal/github/action.go:130:27: G302: Expect file permissions to be 0600 or less (gosec)
githubOutputFile, err := os.OpenFile(gitHubOutputFileName, os.O_APPEND|os.O_WRONLY, 0644)
^
Check failure on line 21 in internal/slice/slice.go
github-actions / golangci
[golangci] internal/slice/slice.go#L21
exported: exported function StartsWithAnyOf should have comment or be unexported (revive)
Raw output
internal/slice/slice.go:21:1: exported: exported function StartsWithAnyOf should have comment or be unexported (revive)
func StartsWithAnyOf(prefixes []string, candidate string) bool {
^
Check failure on line 82 in internal/github/action.go
github-actions / golangci
[golangci] internal/github/action.go#L82
type `specified` is unused (unused)
Raw output
internal/github/action.go:82:6: type `specified` is unused (unused)
type specified func() []string
^
Check failure on line 7 in internal/github/pullrequest/labels.go
github-actions / golangci
[golangci] internal/github/pullrequest/labels.go#L7
import 'github.com/agilepathway/label-checker/internal/error/panic' is not allowed from list 'Main' (depguard)
Raw output
internal/github/pullrequest/labels.go:7:2: import 'github.com/agilepathway/label-checker/internal/error/panic' is not allowed from list 'Main' (depguard)
"github.com/agilepathway/label-checker/internal/error/panic"
^
Check failure on line 8 in internal/github/pullrequest/labels.go
github-actions / golangci
[golangci] internal/github/pullrequest/labels.go#L8
import 'github.com/agilepathway/label-checker/internal/slice' is not allowed from list 'Main' (depguard)
Raw output
internal/github/pullrequest/labels.go:8:2: import 'github.com/agilepathway/label-checker/internal/slice' is not allowed from list 'Main' (depguard)
"github.com/agilepathway/label-checker/internal/slice"
^
Check failure on line 9 in internal/github/pullrequest/pull_request.go
github-actions / golangci
[golangci] internal/github/pullrequest/pull_request.go#L9
import 'github.com/agilepathway/label-checker/internal/error/panic' is not allowed from list 'Main' (depguard)
Raw output
internal/github/pullrequest/pull_request.go:9:2: import 'github.com/agilepathway/label-checker/internal/error/panic' is not allowed from list 'Main' (depguard)
"github.com/agilepathway/label-checker/internal/error/panic"
^
Check failure on line 10 in internal/github/pullrequest/pull_request.go
github-actions / golangci
[golangci] internal/github/pullrequest/pull_request.go#L10
import 'github.com/shurcooL/githubv4' is not allowed from list 'Main' (depguard)
Raw output
internal/github/pullrequest/pull_request.go:10:2: import 'github.com/shurcooL/githubv4' is not allowed from list 'Main' (depguard)
"github.com/shurcooL/githubv4"
^
Check failure on line 7 in label_checker.go
github-actions / golangci
[golangci] label_checker.go#L7
import 'github.com/agilepathway/label-checker/internal/github' is not allowed from list 'Main' (depguard)
Raw output
label_checker.go:7:2: import 'github.com/agilepathway/label-checker/internal/github' is not allowed from list 'Main' (depguard)
"github.com/agilepathway/label-checker/internal/github"
^
Check failure on line 16 in internal/github/action.go
github-actions / golangci
[golangci] internal/github/action.go#L16
import 'github.com/agilepathway/label-checker/internal/error/panic' is not allowed from list 'Main' (depguard)
Raw output
internal/github/action.go:16:2: import 'github.com/agilepathway/label-checker/internal/error/panic' is not allowed from list 'Main' (depguard)
"github.com/agilepathway/label-checker/internal/error/panic"
^
Check failure on line 17 in internal/github/action.go
github-actions / golangci
[golangci] internal/github/action.go#L17
import 'github.com/agilepathway/label-checker/internal/github/pullrequest' is not allowed from list 'Main' (depguard)
Raw output
internal/github/action.go:17:2: import 'github.com/agilepathway/label-checker/internal/github/pullrequest' is not allowed from list 'Main' (depguard)
"github.com/agilepathway/label-checker/internal/github/pullrequest"
^
Check failure on line 11 in internal/github/action.go
github-actions / golangci
[golangci] internal/github/action.go#L11
SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package [io] or package [os], and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
Raw output
internal/github/action.go:11:2: SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package [io] or package [os], and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
"io/ioutil"
^
Check failure on line 32 in internal/github/pullrequest/labels.go
github-actions / golangci
[golangci] internal/github/pullrequest/labels.go#L32
return statements should not be cuddled if block has more than two lines (wsl)
Raw output
internal/github/pullrequest/labels.go:32:2: return statements should not be cuddled if block has more than two lines (wsl)
return l.hasXof(specified, "all", prefixMode)
^
Check failure on line 272 in internal/github/action_test.go
github-actions / golangci
[golangci] internal/github/action_test.go#L272
return statements should not be cuddled if block has more than two lines (wsl)
Raw output
internal/github/action_test.go:272:2: return statements should not be cuddled if block has more than two lines (wsl)
return a.CheckLabels(stdout, stderr), stdout, stderr
^
Check failure on line 158 in internal/github/action_test.go
github-actions / golangci
[golangci] internal/github/action_test.go#L158
expressions should not be cuddled with blocks (wsl)
Raw output
internal/github/action_test.go:158:4: expressions should not be cuddled with blocks (wsl)
setPullRequestNumber(tc.prNumber)
^