File tree Expand file tree Collapse file tree 3 files changed +127
-2
lines changed Expand file tree Collapse file tree 3 files changed +127
-2
lines changed Original file line number Diff line number Diff line change 8
8
workflow_dispatch :
9
9
10
10
jobs :
11
- code-health :
11
+ code-health : # required PR check
12
12
needs : [build, lint, shellcheck]
13
13
runs-on : ubuntu-latest
14
14
permissions : {}
38
38
- name : golangci-lint
39
39
uses : golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8
40
40
with :
41
- version : v1.62.2 # Also update GOLANGCI_VERSION variable in GNUmakefile when updating this version
41
+ version : v1.63.4 # Also update GOLANGCI_VERSION variable in GNUmakefile when updating this version
42
42
- name : actionlint
43
43
run : |
44
44
make tools
Original file line number Diff line number Diff line change
1
+ linters-settings :
2
+ gocritic :
3
+ enabled-tags :
4
+ - diagnostic
5
+ - experimental
6
+ - opinionated
7
+ - performance
8
+ - style
9
+ govet :
10
+ enable-all : true
11
+
12
+ revive :
13
+ # see https://github.com/mgechev/revive#available-rules for details.
14
+ ignore-generated-header : true
15
+ severity : warning
16
+ rules :
17
+ - name : blank-imports
18
+ - name : context-as-argument
19
+ - name : context-keys-type
20
+ - name : dot-imports
21
+ - name : error-return
22
+ - name : error-strings
23
+ - name : error-naming
24
+ - name : errorf
25
+ - name : exported
26
+ - name : indent-error-flow
27
+ - name : if-return
28
+ - name : increment-decrement
29
+ - name : var-naming
30
+ - name : var-declaration
31
+ - name : package-comments
32
+ - name : range
33
+ - name : receiver-naming
34
+ - name : time-naming
35
+ - name : unexported-return
36
+ - name : indent-error-flow
37
+ - name : errorf
38
+ - name : empty-block
39
+ - name : superfluous-else
40
+ - name : struct-tag
41
+ # Too many unusued parameters, skipping this check for now
42
+ # - name: unused-parameter
43
+ - name : unreachable-code
44
+ - name : redefines-builtin-id
45
+ misspell :
46
+ locale : US
47
+ ignore-words :
48
+ - cancelled
49
+ lll :
50
+ # Default is 120. '\t' is counted as 1 character.
51
+ # set our project to 500, as we are adding open api field description in the schema.
52
+ # also, for anyone using vscode, use the following configs:
53
+ # "rewrap.wrappingColumn": 500 ... requires the rewrap plugin
54
+ # "editor.rulers": [500]
55
+ line-length : 500
56
+ nestif :
57
+ # minimal complexity of if statements to report, 5 by default
58
+ min-complexity : 7
59
+ mnd :
60
+ checks :
61
+ - case
62
+ - operation
63
+ - return
64
+ funlen :
65
+ lines : 360
66
+ statements : 120
67
+ linters :
68
+ disable-all : true
69
+ enable :
70
+ - dogsled
71
+ - errcheck
72
+ - funlen
73
+ - gocritic
74
+ - gofmt
75
+ - goimports
76
+ - revive
77
+ - mnd
78
+ - goprintffuncname
79
+ - gosec
80
+ - gosimple
81
+ - govet
82
+ - ineffassign
83
+ - lll
84
+ - misspell
85
+ - nakedret
86
+ - nolintlint
87
+ - rowserrcheck
88
+ - copyloopvar
89
+ - staticcheck
90
+ - stylecheck
91
+ - typecheck
92
+ - unconvert
93
+ - unused
94
+ - whitespace
95
+ - thelper
96
+ - testifylint
97
+ - exhaustive
98
+ - makezero
99
+ - noctx
100
+ - tenv
101
+ - testpackage
102
+ run :
103
+ timeout : 10m
104
+ tests : true
105
+ build-tags :
106
+ - integration
107
+ modules-download-mode : readonly
Original file line number Diff line number Diff line change
1
+ CLI_SOURCE_FILES? =./cmd/plugin
2
+ CLI_BINARY_NAME? =binary
3
+ CLI_DESTINATION =./bin/$(CLI_BINARY_NAME )
4
+
5
+ GOLANGCI_VERSION =v1.63.4 # Also update golangci-lint GH action in code-health.yml when updating this version
6
+
7
+ .PHONY : build
8
+ build :
9
+ @echo " ==> Building plugin binary: $( CLI_BINARY_NAME) "
10
+ go build -o $(CLI_DESTINATION ) $(CLI_SOURCE_FILES )
11
+
12
+ .PHONY : tools
13
+ tools : # # Install dev tools
14
+ @echo " ==> Installing dependencies..."
15
+ go telemetry off # disable sending telemetry data, more info: https://go.dev/doc/telemetry
16
+ go install github.com/rhysd/actionlint/cmd/actionlint@latest
17
+ go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@latest
18
+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH) /bin $(GOLANGCI_VERSION )
You can’t perform that action at this time.
0 commit comments