-
Notifications
You must be signed in to change notification settings - Fork 0
Fix failing golangci-lint in CI #1330
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
Conversation
See golangci/golangci-lint@4b7a55a for detail This option should be replaced again after v2 https://github.com/golangci/golangci-lint/blob/544018f712a7506c49ecdb75b8cb5a4e7bbb7534/docs/src/docs/product/migration-guide.mdx#runskip-dirs
issues: | ||
exclude-dirs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この config 自体は golangci-lint config verify
で verify をかけられるんだけれど、migrationガイドに沿って一足飛びに v2 系の linters.exclusions
に差し替えようとするとやはり落ちる。
schema に version が用意されたのも最近の様で、指定ができない
migration tool も v1 時代から deprecate だった config には対応していないらしい
ということで、一旦古い情報を探すと golangci/golangci-lint#4509 での更新内容に添わせれば一旦通るようだった。
v2 系に上げるときには再度見直しが必要っぽいけどとりあえずこれで
@@ -41,6 +41,6 @@ jobs: | |||
with: | |||
go-version-file: "go.mod" | |||
cache-dependency-path: "go.sum" | |||
- uses: golangci/golangci-lint-action@v6 | |||
- uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
敢えてこのトラブルが発生しだした一番古いversionに止めてある
これ以降の更新は dependabot が出してくるはずなのでそれ単位で
#1287 以降 golangci-lint でCIが落ちている
ログとか upstream の更新状況を見る限り https://github.com/golangci/golangci-lint-action/releases/tag/v6.5.0 で verify option がデフォルトで有効にされたため、もともと壊れていたが気付けなかった config schema の古さから落ちるようになったと思われる
golangci/golangci-lint-action#1171
通ってたとき
落ちるようになってから
https://github.com/golangci/golangci-lint/blob/544018f712a7506c49ecdb75b8cb5a4e7bbb7534/docs/src/docs/product/migration-guide.mdx#runskip-dirs みたいな変更をかければ直ると思うけれど、再現性が無いとどちらにせよキツイのでまず GHA のバージョンであることの確認後に今後は該当アクションのメジャーバージョンかつタグのみ利用を避ける。そんで config 更新して通れば滞留している dependabot PRs をマージしてヨシとする