Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update golangci-lint and VS code configs #328

Merged
merged 4 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading