Skip to content
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

Cleanup #88

Merged
merged 1 commit into from
Sep 13, 2024
Merged

Cleanup #88

merged 1 commit into from
Sep 13, 2024

Conversation

bufdev
Copy link
Collaborator

@bufdev bufdev commented Sep 13, 2024

This gets this repository into the modern age of Go.

  • Add a Makefile to run common development commands. Most importantly, the default make command, make all, runs the exact same thing that is run in CI. This makes it easy to verify locally that CI will pass (which is especially important for contributors). Run make help to see the commands that can be run.
  • Move linting to be controlled by golangci-lint instead of just staticcheck. This also adds a basic configuration file. The only linter that is ignored from the defaults is a deprecation warning for github.com/jhump/protoreflect, which is out of scope for this PR. golangci-lint is automatically installed by the Makefile.
  • Make all the small fixes to get golangci-lint to pass.
  • Make CI use make all.
  • Remove CODEOWNERS, which references a GitHub team in googleapis.
  • Move quality-checker into internal/cmd, as it is used by the Makefile.
  • Update dependencies.
  • Use go version 1.23.x everywhere in CI. At minimum, dependencies of api-linter will require Go 1.21 (and likely 1.22 soon, many repos are updating to this). If you are going to update dependencies, the go.mod has to be updated to specify a minimum compatible version of 1.21 pretty much now, regardless of this change. In 1.21, the toolchain directive was added which says "actually use this Go version when building and testing this module". If detected, Go versions >= 1.21 will actually download the specified Go version behind the scenes, and run with that. All Go versions >= 1.21 will test for compatibility with the version specified in the go.mod (in this case 1.21), and run with the specified toolchain. So at that point, you might as well run with the latest Go version in your CI configurations, in this case 1.23.x (ie the latest patch of 1.23). So, all GitHub Actions are updated to do so.

@bufdev bufdev mentioned this pull request Sep 13, 2024
@rambleraptor rambleraptor merged commit 14856ea into aep-dev:main Sep 13, 2024
1 check 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