Skip to content

Commit

Permalink
Update golangci-lint and VS code configs
Browse files Browse the repository at this point in the history
  • Loading branch information
pellared committed Jul 30, 2024
1 parent d02f9a0 commit 044b477
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 8 deletions.
15 changes: 9 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,46 @@ linters-settings:
min-complexity: 15
goimports:
local-prefixes: github.com/golang-templates/seed
govet:
shadow: true
misspell:
locale: US
nolintlint:
allow-leading-space: false # require machine-readable nolint directives (with no leading space)
allow-unused: false # report any unused nolint directives
require-explanation: true # require an explanation for nolint directives
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
require-specific: true # require nolint directives to be specific about which linter is being skipped
revive:
confidence: 0

linters:
disable-all: true
enable:
- bodyclose
- asasalint
- dogsled
- dupl
- dupword
- errcheck
- exportloopref
- funlen
- gochecknoinits
- gocritic
- goconst
- gocyclo
- gofumpt
- goimports
- revive
- rowserrcheck
- godot
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- misspell
- mnd
- nakedret
- noctx
- nolintlint
- perfsprint
- staticcheck
- stylecheck
- sqlclosecheck
Expand All @@ -53,5 +56,5 @@ linters:
- whitespace

issues:
# enable issues excluded by default
exclude-use-default: false
exclude:
- EXC0001
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"[go]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.organizeImports": "explicit"
},
},
"[go.mod]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.organizeImports": "explicit"
},
},
// gopls
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

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

### Added

- Add `asasalint` linter.
- Add `dupword` linter.
- Add `godot` linter.
- Add `mnd` linter.
- Add `perfsprint` linter.
- Add `EXC0001` exclusion as the most common false postive.

### Changed

- Change `nolintlint` linter settings to not allow leading space and require to specific about which linter is being skipped.
- Change `govet` linter settings to default.
- Add `

### Removed

- Remove `gochecknoinits` linter.

## [0.19.0](https://github.com/golang-templates/seed/releases/tag/v0.19.0)

### Added
Expand Down

0 comments on commit 044b477

Please sign in to comment.