Skip to content
Open
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
3 changes: 1 addition & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ linters:
disable-all: true
enable:
- ineffassign
- typecheck
- unused
- asciicheck
- bidichk
Expand All @@ -45,4 +44,4 @@ issues:
- scripts
- stapel
exclude:
- "non-wrapping format verb for fmt.Errorf" # errorlint
- "non-wrapping format verb for fmt.Errorf" # errorlint
11 changes: 6 additions & 5 deletions Taskfile.format_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ silent: true

env:
PRETTIER_VERSION: "3.5.3"
GOLANGCI_LINT_VERSION: "v1.61.0"

tasks:
format:
Expand Down Expand Up @@ -40,16 +41,16 @@ tasks:
- lint:prettier

lint:golangci-lint:cgo:
desc: 'Lint with golangci-lint for cgo. Important vars: "golangciPaths".'
desc: 'Lint with golangci-lint for cgo (docker). Important vars: "golangciPaths".'
cmds:
- golangci-lint run --build-tags="{{.cgoTags}}" -c <(curl https://raw.githubusercontent.com/werf/common-ci/refs/heads/main/.golangci.yml) {{.CLI_ARGS}} {{.golangciPaths | default "./..."}}
- docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:${GOLANGCI_LINT_VERSION} bash -c 'golangci-lint run --build-tags="{{.cgoTags}}" -c <(curl -sSfL https://raw.githubusercontent.com/werf/common-ci/refs/heads/chore/golangci-lint-docker/.golangci.yml) {{.CLI_ARGS}} {{.golangciPaths | default "./..."}}'
env:
CGO_ENABLED: "1"

lint:golangci-lint:go:
desc: 'Lint with golangci-lint without cgo. Important vars: "golangciPaths".'
desc: 'Lint with golangci-lint without cgo (docker). Important vars: "golangciPaths".'
cmds:
- golangci-lint run --build-tags="{{.goTags}}" -c <(curl https://raw.githubusercontent.com/werf/common-ci/refs/heads/main/.golangci.yml) {{.CLI_ARGS}} {{.golangciPaths | default "./..."}}
- docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:${GOLANGCI_LINT_VERSION} bash -c 'golangci-lint run --build-tags="{{.goTags}}" -c <(curl -sSfL https://raw.githubusercontent.com/werf/common-ci/refs/heads/chore/golangci-lint-docker/.golangci.yml) {{.CLI_ARGS}} {{.golangciPaths | default "./..."}}'
env:
CGO_ENABLED: "0"

Expand All @@ -69,7 +70,7 @@ tasks:
golangciPaths: "{{.golangciPaths}}"

lint:golangci-lint:
desc: 'Lint with golangci-lint (with and without cgo). Important vars: "golangciPaths".'
desc: 'Lint with golangci-lint (with and without cgo, docker-based). Important vars: "golangciPaths".'
deps:
- task: _lint:golangci-lint:{{ternary "cgo-and-go" "go" (eq .mode "cgo")}}
vars:
Expand Down