Skip to content

Commit

Permalink
Update golangci-lint and VS code configs (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
pellared authored Jul 30, 2024
1 parent 97d4452 commit 5908b9c
Show file tree
Hide file tree
Showing 3 changed files with 29 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
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@ 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. ([#328](https://github.com/golang-templates/seed/pull/328))
- Add `dupword` linter. ([#328](https://github.com/golang-templates/seed/pull/328))
- Add `godot` linter. ([#328](https://github.com/golang-templates/seed/pull/328))
- Add `mnd` linter. ([#328](https://github.com/golang-templates/seed/pull/328))
- Add `perfsprint` linter. ([#328](https://github.com/golang-templates/seed/pull/328))
- Add `EXC0001` exclusion as the most common false positive. ([#328](https://github.com/golang-templates/seed/pull/328))

### Changed

- 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))
- Change `govet` linter settings to default. ([#328](https://github.com/golang-templates/seed/pull/328))

### Removed

- Remove `gochecknoinits` linter. ([#328](https://github.com/golang-templates/seed/pull/328))

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

### Added
Expand Down

0 comments on commit 5908b9c

Please sign in to comment.