Skip to content

Commit f014c89

Browse files
authored
linter updates (#150)
1 parent b73b733 commit f014c89

3 files changed

Lines changed: 21 additions & 19 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
check-latest: true
6363

6464
- name: Lint with golangci-lint
65-
uses: golangci/golangci-lint-action@4696ba8babb6127d732c3c6dde519db15edab9ea # v6.5.1
65+
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
6666
with:
6767
version: latest
6868

.golangci.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
1+
version: "2"
12
run:
2-
timeout: 10m
3-
4-
# Run linters over integration tests
53
build-tags:
64
- integration
7-
85
linters:
9-
disable-all: true # Disable defaults, then enable the ones we want
6+
default: none
107
enable:
118
- errcheck
12-
- gosimple
9+
- gosec
1310
- govet
1411
- ineffassign
1512
- staticcheck
16-
# - structcheck https://github.com/golangci/golangci-lint/issues/2649
17-
- typecheck
1813
- unused
19-
# - bodyclose Disabled so concurrent GETs can happen
20-
- stylecheck
21-
- gosec
22-
- goimports
14+
settings:
15+
staticcheck:
16+
checks:
17+
- -SA1019
18+
- all
19+
exclusions:
20+
generated: lax
21+
presets:
22+
- comments
23+
- common-false-positives
24+
- legacy
25+
- std-error-handling
26+
formatters:
27+
enable:
2328
- gci
24-
25-
linters-settings:
26-
staticcheck:
27-
checks:
28-
- all
29-
- "-SA1019" # Disable "rand.Seed has been deprecated"
29+
- goimports
30+
- gofmt

internal/stm32CubeMX/stm32CubeMX.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ func Process(cbuildGenIdxYmlPath, outPath, cubeMxPath string, runCubeMx bool, pi
215215
}
216216
fIoc.Close()
217217
for { // wait for .mxproject change
218+
//nolint:staticcheck // intentional logic for clarity
218219
if !running {
219220
break // out of loop if CubeMX does not run anymore
220221
}

0 commit comments

Comments
 (0)