Skip to content

Commit ecded82

Browse files
authored
Merge pull request #3 from muonsoft/slog-native
adopting package to be slog native
2 parents e81e607 + 172a28e commit ecded82

21 files changed

Lines changed: 2528 additions & 539 deletions

.github/workflows/tests.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,23 @@ jobs:
1010
test:
1111
runs-on: ubuntu-latest
1212
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
1316
- name: Set up Go
14-
uses: actions/setup-go@v2
17+
uses: actions/setup-go@v5
1518
with:
16-
go-version: ^1.20
19+
go-version: ^1.21
20+
cache-dependency-path: go.sum
1721
id: go
1822

19-
- name: Checkout code
20-
uses: actions/checkout@v2
21-
2223
- name: Set up dependencies
2324
run: go mod download
2425

2526
- name: Run golangci-lint
26-
uses: golangci/golangci-lint-action@v2
27+
uses: golangci/golangci-lint-action@v9
2728
with:
28-
version: v1.52
29+
version: v2.6.1
2930

3031
- name: Run tests
31-
run: go test -v $(go list ./... | grep -v vendor)
32+
run: go test -race -v ./...

.golangci.yml

Lines changed: 73 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
run:
2-
skip-dirs:
3-
- var
1+
version: "2"
42
linters:
53
enable:
64
- asciicheck
@@ -11,7 +9,6 @@ linters:
119
- dogsled
1210
- dupl
1311
- durationcheck
14-
- exportloopref
1512
- forbidigo
1613
- funlen
1714
- gocognit
@@ -20,68 +17,98 @@ linters:
2017
- gocyclo
2118
- godot
2219
- godox
23-
- gofmt
24-
- gofumpt
25-
- goimports
2620
- gomodguard
2721
- goprintffuncname
2822
- gosec
29-
- gosimple
30-
- govet
3123
- importas
32-
- ineffassign
3324
- lll
3425
- makezero
3526
- misspell
3627
- nakedret
3728
- nestif
3829
- nilerr
3930
- noctx
40-
- noctx
4131
- nolintlint
4232
- prealloc
4333
- predeclared
4434
- promlinter
4535
- revive
46-
- stylecheck
47-
- tenv
36+
- staticcheck
4837
- testpackage
4938
- thelper
5039
- tparallel
51-
- typecheck
5240
- unconvert
5341
- unparam
54-
- unused
5542
- whitespace
56-
57-
issues:
58-
exclude-rules:
59-
# Exclude some linters from running on tests files.
60-
- path: _test\.go
61-
linters:
62-
- contextcheck
63-
- cyclop
64-
- dupl
65-
- errcheck
66-
- exportloopref
67-
- funlen
68-
- gochecknoglobals
69-
- goconst
70-
- gocritic
71-
- gocyclo
72-
- gosec
73-
- lll
74-
- path: errors\.go
75-
linters:
76-
- errcheck
77-
- path: stack\.go
78-
linters:
79-
- errcheck
80-
- goconst
81-
- gocritic
82-
83-
linters-settings:
84-
revive:
43+
settings:
44+
depguard:
45+
rules:
46+
main:
47+
files:
48+
- $all
49+
- '!$test'
50+
- '!**/test/**/*'
51+
allow:
52+
- $gostd
53+
- github.com
54+
test:
55+
files:
56+
- $test
57+
allow:
58+
- $gostd
59+
- github.com
60+
revive:
61+
rules:
62+
- name: var-naming
63+
disabled: true
64+
exclusions:
65+
generated: lax
66+
presets:
67+
- comments
68+
- common-false-positives
69+
- legacy
70+
- std-error-handling
8571
rules:
86-
- name: var-naming
87-
disabled: true
72+
- linters:
73+
- contextcheck
74+
- cyclop
75+
- dupl
76+
- errcheck
77+
- exportloopref
78+
- funlen
79+
- gochecknoglobals
80+
- gocognit
81+
- goconst
82+
- gocritic
83+
- gocyclo
84+
- gosec
85+
- lll
86+
- nestif
87+
path: _test\.go
88+
- linters:
89+
- errcheck
90+
path: errors\.go
91+
- linters:
92+
- nestif
93+
path: errorstest
94+
- linters:
95+
- errcheck
96+
- goconst
97+
- gocritic
98+
path: stack\.go
99+
paths:
100+
- var
101+
- third_party$
102+
- builtin$
103+
- examples$
104+
formatters:
105+
enable:
106+
- gofmt
107+
- gofumpt
108+
- goimports
109+
exclusions:
110+
generated: lax
111+
paths:
112+
- third_party$
113+
- builtin$
114+
- examples$

0 commit comments

Comments
 (0)