Skip to content

Commit

Permalink
chore: cleanup golagci-lint configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
lburgazzoli committed May 9, 2024
1 parent 4114271 commit fe87df3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
16 changes: 1 addition & 15 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ linters:
enable-all: true
disable:
- cyclop
- deadcode
- depguard
- dupl
- exhaustive
Expand All @@ -39,36 +38,22 @@ linters:
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocyclo
- godox
- err113
- gofumpt
- golint
- gomnd
- gomoddirectives
- ifshort
- interfacer
- ireturn
- lll
- maligned
- nakedret
- nestif
- nilnil
- nlreturn
- nolintlint
- nosnakecase
- paralleltest
- revive
- rowserrcheck
- scopelint
- structcheck
- sqlclosecheck
- tagalign
- tagliatelle
- tenv
- testpackage
- varcheck
- varnamelen
- wastedassign
- whitespace
Expand All @@ -79,3 +64,4 @@ linters:
# lint violation make a lot of sense so we should re-enable the lints below and work to fix the findings
- mnd
- perfsprint
- goconst
13 changes: 13 additions & 0 deletions script/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ GOVULNCHECK_VERSION ?= latest

LINTER ?= $(LOCALBIN)/golangci-lint
GOVULNCHECK ?= $(LOCALBIN)/govulncheck
GOIMPORT ?= $(LOCALBIN)/goimports

BASE_IMAGE := eclipse-temurin:17
LOCAL_REPOSITORY := /etc/maven/m2
Expand Down Expand Up @@ -443,6 +444,11 @@ lint-fix: golangci-lint
vuln: govulncheck
@$(GOVULNCHECK) ./...

.PHONY: fmt
fmt: goimport
$(GOIMPORT) -l -w .
go fmt ./...

dir-licenses:
./script/vendor-license-directory.sh

Expand Down Expand Up @@ -743,3 +749,10 @@ govulncheck: $(GOVULNCHECK)
$(GOVULNCHECK): $(LOCALBIN)
@test -s $(GOVULNCHECK) || \
GOBIN=$(LOCALBIN) go install golang.org/x/vuln/cmd/govulncheck@$(GOVULNCHECK_VERSION)

.PHONY: goimport
goimport: $(GOIMPORT)
$(GOIMPORT): $(LOCALBIN)
@test -s $(LOCALBIN)/goimport || \
GOBIN=$(LOCALBIN) go install golang.org/x/tools/cmd/goimports@latest

0 comments on commit fe87df3

Please sign in to comment.