Skip to content

Commit 5908b9c

Browse files
authored
Update golangci-lint and VS code configs (#328)
1 parent 97d4452 commit 5908b9c

File tree

3 files changed

+29
-8
lines changed

3 files changed

+29
-8
lines changed

.golangci.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,43 +6,46 @@ linters-settings:
66
min-complexity: 15
77
goimports:
88
local-prefixes: github.com/golang-templates/seed
9-
govet:
10-
shadow: true
119
misspell:
1210
locale: US
1311
nolintlint:
12+
allow-leading-space: false # require machine-readable nolint directives (with no leading space)
1413
allow-unused: false # report any unused nolint directives
1514
require-explanation: true # require an explanation for nolint directives
16-
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
15+
require-specific: true # require nolint directives to be specific about which linter is being skipped
1716
revive:
1817
confidence: 0
1918

2019
linters:
2120
disable-all: true
2221
enable:
2322
- bodyclose
23+
- asasalint
2424
- dogsled
2525
- dupl
26+
- dupword
2627
- errcheck
2728
- exportloopref
2829
- funlen
29-
- gochecknoinits
3030
- gocritic
3131
- goconst
3232
- gocyclo
3333
- gofumpt
3434
- goimports
3535
- revive
3636
- rowserrcheck
37+
- godot
3738
- goprintffuncname
3839
- gosec
3940
- gosimple
4041
- govet
4142
- ineffassign
4243
- misspell
44+
- mnd
4345
- nakedret
4446
- noctx
4547
- nolintlint
48+
- perfsprint
4649
- staticcheck
4750
- stylecheck
4851
- sqlclosecheck
@@ -53,5 +56,5 @@ linters:
5356
- whitespace
5457

5558
issues:
56-
# enable issues excluded by default
57-
exclude-use-default: false
59+
exclude:
60+
- EXC0001

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
"[go]": {
33
"editor.formatOnSave": true,
44
"editor.codeActionsOnSave": {
5-
"source.organizeImports": true,
5+
"source.organizeImports": "explicit"
66
},
77
},
88
"[go.mod]": {
99
"editor.formatOnSave": true,
1010
"editor.codeActionsOnSave": {
11-
"source.organizeImports": true,
11+
"source.organizeImports": "explicit"
1212
},
1313
},
1414
// gopls

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased](https://github.com/golang-templates/seed/compare/v0.19.0...HEAD)
99

10+
### Added
11+
12+
- Add `asasalint` linter. ([#328](https://github.com/golang-templates/seed/pull/328))
13+
- Add `dupword` linter. ([#328](https://github.com/golang-templates/seed/pull/328))
14+
- Add `godot` linter. ([#328](https://github.com/golang-templates/seed/pull/328))
15+
- Add `mnd` linter. ([#328](https://github.com/golang-templates/seed/pull/328))
16+
- Add `perfsprint` linter. ([#328](https://github.com/golang-templates/seed/pull/328))
17+
- Add `EXC0001` exclusion as the most common false positive. ([#328](https://github.com/golang-templates/seed/pull/328))
18+
19+
### Changed
20+
21+
- Change `nolintlint` linter settings to not allow leading space and require to specific about which linter is being skipped. ([#328](https://github.com/golang-templates/seed/pull/328))
22+
- Change `govet` linter settings to default. ([#328](https://github.com/golang-templates/seed/pull/328))
23+
24+
### Removed
25+
26+
- Remove `gochecknoinits` linter. ([#328](https://github.com/golang-templates/seed/pull/328))
27+
1028
## [0.19.0](https://github.com/golang-templates/seed/releases/tag/v0.19.0)
1129

1230
### Added

0 commit comments

Comments
 (0)