Skip to content

Commit 6a6cd77

Browse files
authored
tests: split default config files into dedicated package (#158)
* tests: move default config to dedicated package * chore: fix golangci-lint * chore: fix wrong move
1 parent c862f08 commit 6a6cd77

File tree

22 files changed

+32
-14
lines changed

22 files changed

+32
-14
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
go-version: stable
1616
- uses: golangci/golangci-lint-action@v4
1717
with:
18-
version: v1.57.2
18+
version: v1.62.2
1919

2020
tests:
2121
# run after golangci-lint action to not produce duplicated errors

.golangci.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,36 +39,28 @@ linters:
3939
enable-all: true
4040
disable:
4141
- cyclop
42-
- deadcode
4342
- depguard
4443
- dupl
4544
- dupword
46-
- exhaustivestruct
4745
- exhaustruct
46+
- exportloopref
4847
- forbidigo
4948
- funlen
5049
- gci
5150
- gocognit
5251
- gocyclo
5352
- godox
54-
- golint
55-
- gomnd
56-
- ifshort
57-
- interfacer
53+
- mnd
5854
- lll
5955
- maintidx
60-
- maligned
6156
- nakedret
6257
- nestif
6358
- nlreturn
64-
- nosnakecase
6559
- paralleltest
6660
- prealloc
6761
- rowserrcheck
68-
- scopelint
69-
- structcheck
62+
- tparallel
7063
- testpackage
71-
- varcheck
7264
- varnamelen
7365
- wastedassign
7466

File renamed without changes.

testdata/src/default_config/else_if.go renamed to testdata/src/default_config/else_if/else_if.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package testdata
2+
13
func fn() {
24
if true { // want "block should not start with a whitespace"
35

testdata/src/default_config/else_if.go.golden renamed to testdata/src/default_config/else_if/else_if.go.golden

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package testdata
2+
13
func fn() {
24
if true { // want "block should not start with a whitespace"
35
fmt.Println("a")
@@ -11,6 +13,7 @@ func fn() {
1113
fmt.Println("c")
1214
fmt.Println("c")
1315
fmt.Println("c")
16+
1417
return // want "return statements should not be cuddled if block has more than two lines"
1518
} // want "block should not end with a whitespace"
1619
}

0 commit comments

Comments
 (0)