Skip to content

Commit a3e6ffc

Browse files
authored
Merge pull request #20 from muonsoft/next
- improve readme - fix: correct linter version to v2.6.1 - update: upgrade GitHub Actions and Go setup versions, improve test command - feat: add support for JSON Lines (NDJSON) assertions - feat: enhance string assertions with prefix, suffix, integer, and number checks - feat: add array of strings assertions to assertjson
2 parents 26eabfc + 914edcd commit a3e6ffc

16 files changed

Lines changed: 1408 additions & 253 deletions

File tree

.github/workflows/main.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,23 @@ jobs:
99
test:
1010
runs-on: ubuntu-latest
1111
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
1215
- name: Set up Go
13-
uses: actions/setup-go@v2
16+
uses: actions/setup-go@v5
1417
with:
1518
go-version: ^1.16
19+
cache-dependency-path: go.sum
1620
id: go
1721

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

2425
- name: Run golangci-lint
25-
uses: golangci/golangci-lint-action@v2
26+
uses: golangci/golangci-lint-action@v9
2627
with:
27-
version: v1.63
28+
version: v2.6.1
2829

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

.golangci.yml

Lines changed: 59 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
version: "2"
12
linters:
23
enable:
34
- asciicheck
@@ -8,85 +9,93 @@ linters:
89
- depguard
910
- dogsled
1011
- durationcheck
11-
- errcheck
1212
- errorlint
1313
- forbidigo
1414
- funlen
15-
- gci
1615
- gocognit
1716
- goconst
1817
- gocritic
1918
- gocyclo
2019
- godot
2120
- godox
22-
- gofmt
23-
- gofumpt
24-
- goimports
2521
- gomodguard
2622
- goprintffuncname
2723
- gosec
28-
- gosimple
29-
- govet
3024
- importas
31-
- ineffassign
3225
- makezero
3326
- misspell
3427
- nakedret
3528
- nestif
3629
- nilerr
3730
- noctx
38-
- noctx
3931
- nolintlint
4032
- prealloc
4133
- predeclared
4234
- promlinter
4335
- rowserrcheck
4436
- sqlclosecheck
45-
- stylecheck
46-
- tenv
37+
- staticcheck
4738
- testpackage
4839
- thelper
4940
- tparallel
50-
- typecheck
5141
- unconvert
5242
- unparam
53-
- unused
5443
- whitespace
55-
56-
issues:
57-
exclude-dirs:
58-
- var
59-
exclude-rules:
60-
# Exclude some linters from running on tests files.
61-
- path: _test\.go
62-
linters:
63-
- funlen
64-
- lll
65-
- gocyclo
66-
- errcheck
67-
- dupl
68-
- gosec
69-
- scopelint
70-
- gochecknoglobals
71-
- goerr113
72-
73-
linters-settings:
74-
depguard:
44+
settings:
45+
depguard:
46+
rules:
47+
main:
48+
files:
49+
- $all
50+
- '!$test'
51+
- '!**/test/**/*'
52+
allow:
53+
- $gostd
54+
- github.com
55+
- gopkg.in
56+
test:
57+
files:
58+
- $test
59+
allow:
60+
- $gostd
61+
- github.com
62+
gosec:
63+
excludes:
64+
- G115
65+
exclusions:
66+
generated: lax
67+
presets:
68+
- comments
69+
- common-false-positives
70+
- legacy
71+
- std-error-handling
7572
rules:
76-
main:
77-
files:
78-
- $all
79-
- "!$test"
80-
- "!**/test/**/*"
81-
allow:
82-
- $gostd
83-
- github.com
84-
test:
85-
files:
86-
- "$test"
87-
allow:
88-
- $gostd
89-
- github.com
90-
gosec:
91-
excludes:
92-
- G115
73+
- linters:
74+
- dupl
75+
- err113
76+
- errcheck
77+
- funlen
78+
- gochecknoglobals
79+
- gocyclo
80+
- gosec
81+
- lll
82+
- scopelint
83+
path: _test\.go
84+
paths:
85+
- var
86+
- third_party$
87+
- builtin$
88+
- examples$
89+
formatters:
90+
enable:
91+
- gci
92+
- gofmt
93+
- gofumpt
94+
- goimports
95+
exclusions:
96+
generated: lax
97+
paths:
98+
- var
99+
- third_party$
100+
- builtin$
101+
- examples$

0 commit comments

Comments
 (0)