Skip to content

Commit 6d99cd2

Browse files
deps(docker): Bump alpine from 3.21 to 3.22 (#155)
* deps(docker): Bump alpine from 3.21 to 3.22 Bumps alpine from 3.21 to 3.22. --- updated-dependencies: - dependency-name: alpine dependency-version: '3.22' dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * fix(lint): update lint config Signed-off-by: Dave Henderson <dhenderson@gmail.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Dave Henderson <dhenderson@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dave Henderson <dhenderson@gmail.com>
1 parent 35765ce commit 6d99cd2

File tree

4 files changed

+62
-44
lines changed

4 files changed

+62
-44
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,15 @@ jobs:
1818
- uses: actions/checkout@v4
1919
- run: make test
2020
lint:
21+
name: lint
2122
runs-on: ubuntu-latest
22-
container:
23-
image: ghcr.io/hairyhenderson/gomplate-ci-build:latest
2423
steps:
2524
- uses: actions/checkout@v4
26-
- run: make ci-lint
25+
- uses: actions/setup-go@v5
26+
with:
27+
go-version-file: go.mod
28+
- name: golangci-lint
29+
uses: golangci/golangci-lint-action@v8
30+
with:
31+
version: latest
32+
args: --verbose --max-same-issues=0 --max-issues-per-linter=0

.golangci.yml

Lines changed: 50 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,8 @@
1-
linters-settings:
2-
govet:
3-
enable-all: true
4-
gocyclo:
5-
min-complexity: 10
6-
gomoddirectives:
7-
replace-local: false
8-
replace-allow-list: []
9-
dupl:
10-
threshold: 100
11-
goconst:
12-
min-len: 2
13-
min-occurrences: 4
14-
ignore-tests: true
15-
lll:
16-
line-length: 140
17-
nolintlint:
18-
allow-unused: false # report any unused nolint directives
19-
require-explanation: false # don't require an explanation for nolint directives
20-
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
21-
1+
version: "2"
2+
run:
3+
concurrency: 8
224
linters:
23-
disable-all: true
5+
default: none
246
enable:
257
- asciicheck
268
- bodyclose
@@ -35,18 +17,13 @@ linters:
3517
- exhaustive
3618
- fatcontext
3719
- funlen
38-
- gci
3920
- gochecknoglobals
4021
- gochecknoinits
4122
- gocognit
4223
- goconst
4324
- gocritic
4425
- gocyclo
45-
## - godox
46-
- gofmt
47-
- gofumpt
4826
- goheader
49-
- goimports
5027
- gomoddirectives
5128
- gomodguard
5229
- goprintffuncname
@@ -78,22 +55,58 @@ linters:
7855
- sloglint
7956
- spancheck
8057
- sqlclosecheck
81-
- tenv
58+
- staticcheck
8259
- testifylint
8360
- thelper
8461
- tparallel
85-
- typecheck
8662
- unconvert
8763
- unparam
8864
- unused
8965
- usestdlibvars
9066
- whitespace
9167
- wsl
92-
# slower linters
93-
- gosimple
94-
- staticcheck
95-
- stylecheck
96-
97-
run:
98-
concurrency: 8
99-
timeout: 10m
68+
settings:
69+
dupl:
70+
threshold: 100
71+
goconst:
72+
min-len: 2
73+
min-occurrences: 4
74+
gocyclo:
75+
min-complexity: 10
76+
gomoddirectives:
77+
replace-local: false
78+
govet:
79+
enable-all: true
80+
lll:
81+
line-length: 140
82+
nolintlint:
83+
require-explanation: false
84+
require-specific: false
85+
allow-unused: false
86+
exclusions:
87+
generated: lax
88+
presets:
89+
- comments
90+
- common-false-positives
91+
- legacy
92+
- std-error-handling
93+
rules:
94+
- linters:
95+
- goconst
96+
path: (.+)_test\.go
97+
paths:
98+
- third_party$
99+
- builtin$
100+
- examples$
101+
formatters:
102+
enable:
103+
- gci
104+
- gofmt
105+
- gofumpt
106+
- goimports
107+
exclusions:
108+
generated: lax
109+
paths:
110+
- third_party$
111+
- builtin$
112+
- examples$

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ COPY --from=build /bin/${PKG_NAME}_${TARGETOS}-${TARGETARCH}${TARGETVARIANT} /${
4040

4141
ENTRYPOINT [ "/sagemcom_fast_exporter" ]
4242

43-
FROM alpine:3.21 AS alpine
43+
FROM alpine:3.22 AS alpine
4444

4545
ARG PKG_NAME
4646
ARG VCS_REF

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,9 @@ test:
9999
endif
100100

101101
lint:
102-
@golangci-lint run --verbose --max-same-issues=0 --max-issues-per-linter=0 --sort-results
102+
@golangci-lint run --verbose --max-same-issues=0 --max-issues-per-linter=0
103103

104-
ci-lint:
105-
@golangci-lint run --verbose --max-same-issues=0 --max-issues-per-linter=0 --sort-results --out-format=github-actions
104+
ci-lint: lint
106105

107106
.PHONY: clean test build lint ci-lint
108107
.DELETE_ON_ERROR:

0 commit comments

Comments
 (0)