Skip to content

chore: Use golangci-lint-action; remove newreposecretwithlibsodium#4119

Merged
gmlewis merged 1 commit intogoogle:masterfrom
alexandear-org:chore/use-golangci-lint-action
Mar 23, 2026
Merged

chore: Use golangci-lint-action; remove newreposecretwithlibsodium#4119
gmlewis merged 1 commit intogoogle:masterfrom
alexandear-org:chore/use-golangci-lint-action

Conversation

@alexandear
Copy link
Contributor

@alexandear alexandear commented Mar 23, 2026

  • Update GitHub Actions linter workflow to use official golangci/golangci-lint-action instead of ./script/lint.sh. It automatically builds custom golangci-lint cache binaries with ~/.cache/golangci-lint, and runs golangci-lint for each module.
  • Remove the libsodium-based example because it requires custom library installation, and golangci-lint fails due to this. I think newreposecretwithxcrypto should be enough.

The cached lint step takes only 40 seconds:

image

Closes #4118
Updates #4070

@alexandear alexandear force-pushed the chore/use-golangci-lint-action branch from 9fabd9d to cb6e035 Compare March 23, 2026 12:19
@gmlewis gmlewis changed the title chore: Use golangci-lint-action; remove newreposecretwithlibsodium chore: Use golangci-lint-action; remove newreposecretwithlibsodium Mar 23, 2026
@codecov
Copy link

codecov bot commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.71%. Comparing base (a12b8d7) to head (cb6e035).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4119   +/-   ##
=======================================
  Coverage   93.71%   93.71%           
=======================================
  Files         211      211           
  Lines       19614    19614           
=======================================
  Hits        18382    18382           
  Misses       1034     1034           
  Partials      198      198           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

version: v2.10.1 # sync with version in .custom-gcl.yml
experimental: "automatic-module-directories"
- name: Check OpenAPI
run: ./script/metadata.sh update-openapi --validate
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that is it going to check the openapi YAML file every time? If so, I have a concern with this.
That YAML file gets updated frequently (daily?) on the GitHub side, and gets a new hash every time it changes, which would mean that we would be out-of-date with it most of them time.

As it currently stands, we have the freedom and flexibility to update our YAML file when it benefits us to do so, and I would like to continue with this luxury if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I didn't change the previous behaviour.
.script/lint.sh validates OpenAPI every time when running on GitHub Actions:

image

https://github.com/google/go-github/actions/runs/23317729164/job/67821480217#step:5:21

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, excellent! That's perfect. I just didn't want an update.

Thank you, @alexandear!
LGTM.
Merging.

@gmlewis gmlewis merged commit 88c87d1 into google:master Mar 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants