File tree Expand file tree Collapse file tree 3 files changed +44
-29
lines changed Expand file tree Collapse file tree 3 files changed +44
-29
lines changed Original file line number Diff line number Diff line change 1
-
2
- issues :
3
- exclude-files :
4
- # golangci-lint doesn't recognize our generated files (*.gen.go)
5
- - " .+\\ .gen\\ .go$"
6
-
1
+ version : " 2"
7
2
linters :
8
- disable-all : true
3
+ default : none
9
4
enable :
10
5
- errcheck
11
- - gosimple
12
6
- govet
13
7
- ineffassign
14
8
- staticcheck
15
- - typecheck
16
- - unused # everything below this is in addition to enabled-by-default
17
-
18
- - goimports
9
+ - unused
19
10
- copyloopvar
20
11
- exhaustive
21
12
- unconvert
@@ -30,12 +21,37 @@ linters:
30
21
# - gomnd # too strict
31
22
# - tagliatelle # naming, not struct tag validness..
32
23
33
- # full list available by running: $ golangci-lint linters
34
-
35
- linters-settings :
36
- gocritic :
37
- disabled-checks :
38
- - ifElseChain # false positives (some if-else chains with "short ifs" look more cumbersome rewritten)
39
- gosec :
40
- excludes :
41
- - G115 # https://dev.to/ccoveille/about-the-gosec-g115-drama-or-how-i-faced-back-integer-conversion-overflow-in-go-1302
24
+ # full list available by running: $ golangci-lint linters settings:
25
+ settings :
26
+ gocritic :
27
+ disabled-checks :
28
+ - ifElseChain
29
+ gosec :
30
+ excludes :
31
+ - G115
32
+ staticcheck :
33
+ checks :
34
+ - all
35
+ - ' -ST1001' # "Dot imports are discouraged."
36
+ exclusions :
37
+ generated : lax
38
+ presets :
39
+ - comments
40
+ - common-false-positives
41
+ - legacy
42
+ - std-error-handling
43
+ paths :
44
+ - .+\.gen\.go$
45
+ - third_party$
46
+ - builtin$
47
+ - examples$
48
+ formatters :
49
+ enable :
50
+ - goimports
51
+ exclusions :
52
+ generated : lax
53
+ paths :
54
+ - .+\.gen\.go$
55
+ - third_party$
56
+ - builtin$
57
+ - examples$
Original file line number Diff line number Diff line change 1
- FROM golang:1.23.1
1
+ FROM golang:1.24.5
2
2
3
3
WORKDIR /workspace
4
4
Original file line number Diff line number Diff line change @@ -74,20 +74,19 @@ codeGeneration() {
74
74
}
75
75
76
76
staticAnalysis () {
77
- # if we're in GitHub actions, use such an output format that GitHub knows to display the
78
- # errors inline with the code
79
- local output_format_arg=" "
80
- if [ " ${GITHUB_ACTIONS:- } " == " true" ]; then
81
- output_format_arg=" --out-format=github-actions"
82
- fi
77
+ # if [ "${GITHUB_ACTIONS:-}" == "true" ]; then
78
+ # TODO: can't specify `--out-format=github-actions` as it was removed removed. we are supposed to use problem matchers:
79
+ # https://github.com/golangci/golangci-lint-action/blob/main/problem-matchers.json along with the `text` (the default) format.
80
+ # the problem matchers are defined by `golangci-lint-action` and as such encourages vendor lock-in to do everything in discrete actions.
81
+ # fi
83
82
84
83
# its config file is looked up from parent directories, so if we're at /workspace and we have
85
84
# /.golangci.yml, that's going to get used (unless there's /workspace/.golangci.yml)
86
85
87
86
# golangci-lint includes what "$ go vet ./..." would do but also more
88
87
# timeout added because default (1m) sometimes timeouts on bigger projects in underpowered GitHub actions.
89
88
# more details: https://github.com/golangci/golangci-lint-action/issues/297
90
- golangci-lint run --timeout=3m $output_format_arg
89
+ golangci-lint run --timeout=3m
91
90
}
92
91
93
92
builds_count=0
You can’t perform that action at this time.
0 commit comments