Chore: Enable cache on golangci linter (#95471)

* try to enable cache on golangci linter

* bump version

* exclude G115

* reduce timeout

* remove deprecated linter

* bump linter version in bingo

* try a different syntax for workspace modules

* try another command

* add apps to linter path

* try disabling cue codegen

* skip some linting in devenv

* exclude dirs and try again

* try workaround for pkg

* try path instead of dir

* make it one line

* replace package prefix

* exclude xorm

* exclude wire

* file-based aproach to nolint in workspaces

* missing quote

* simplify command line

* change ownership
This commit is contained in:
Serge Zaitsev
2024-11-07 18:15:52 +01:00
committed by GitHub
parent 6638dd9a83
commit d5cde0b60a
11 changed files with 360 additions and 328 deletions
+4 -4
View File
@@ -2,6 +2,7 @@ name: golangci-lint
on:
push:
paths:
- apps/**
- pkg/**
- .github/workflows/go_lint.yml
- go.*
@@ -13,6 +14,7 @@ permissions:
contents: read
jobs:
lint-go:
runs-on: ubuntu-latest
steps:
@@ -20,13 +22,11 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- run: CODEGEN_VERIFY=1 make gen-cue
- run: make gen-go
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60.1
version: v1.61.0
args: |
--config .golangci.toml --max-same-issues=0 --max-issues-per-linter=0 --verbose $(./scripts/go-workspace/golangci-lint-includes.sh)
skip-cache: true
--verbose $(go list -m -f '{{.Dir}}' | xargs -I{} sh -c 'test ! -f {}/.nolint && echo {}/...')
install-mode: binary