Skip to content

Conversation

@akashsawan1
Copy link
Contributor

This PR resolves Replace deprecated golint with golangci-lint #709 by replacing golint with golangci-lint.

Changes:

  • Added .golangci.yaml for linting configuration, aligning with the main OPA project.
  • Updated the Makefile to use golangci-lint (v1.64.5) for linting.
  • Removed golint dependency.
  • Removed obsolete scripts: check-lint.sh, check-vet.sh, check-fmt.sh, and the golint package.
  • Updated CI workflow to use make check (replacing make ci-go-check) and increased job timeout from 15 to 30 minutes, following the OPA project approach.
  • Previously, ci-go-check in the GitHub CI workflow required spinning up a Go Docker environment for linting, this is no longer needed.

@akashsawan1
Copy link
Contributor Author

Hi @tjons,

Sorry for the extra PR! I ran into issues while syncing my fork’s main branch, which affected the previous PR.

I’ve updated the CI workflow, and it’s running fine now. The only remaining issues are linter errors, please let me know if you have any suggestions on how to address them.

Thanks again for your help!

@tjons
Copy link
Collaborator

tjons commented Jun 15, 2025

@akashsawan1 looks great! I put some thought into how to handle the new linter errors. Let's handle them as separate PRs in separate issues so we can keep the merge history clean. I've created this milestone: https://github.com/open-policy-agent/opa-envoy-plugin/milestone/1 to manage them and will work on them myself - you're more than welcome to help out too.

I've disabled them with a comment to the relevant issue, so this should be good to merge now.

@tjons tjons force-pushed the feature/golangci-lint-integration branch from 56d6769 to 610c2e7 Compare June 15, 2025 15:23
- Add .golangci.yaml for  linting, following the OPA project approach.
- Update Makefile to use golangci-lint (v1.64.5).

Signed-off-by: Akash Sawan <[email protected]>

refactor: remove check-lint.sh, check-vet.sh, check-fmt.sh, and golint package

Signed-off-by: Akash Sawan <[email protected]>

ci: switch to `make check` in CI workflow and increase timeout

- Updated CI workflow to use `make check` instead of `make ci-go-check`, following the OPA project approach.
- Previously, `ci-go-check` required spinning up a Go Docker environment on the first run; this is no longer needed with `make check`.
- Increased job timeout from 15 to 30 minutes to allow more time for linting, following the OPA project.

Signed-off-by: Akash Sawan <[email protected]>
Signed-off-by: tjons <[email protected]>
@tjons tjons force-pushed the feature/golangci-lint-integration branch from 610c2e7 to 5c91a05 Compare June 15, 2025 15:26
Copy link
Collaborator

@tjons tjons left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

@tjons tjons merged commit a8d4532 into open-policy-agent:main Jun 15, 2025
8 checks passed
pweiber pushed a commit to pweiber/opa-envoy-plugin that referenced this pull request Jun 18, 2025
…agent#722)

- Add .golangci.yaml for  linting, following the OPA project approach.
- Update Makefile to use golangci-lint (v1.64.5).



refactor: remove check-lint.sh, check-vet.sh, check-fmt.sh, and golint package



ci: switch to `make check` in CI workflow and increase timeout

- Updated CI workflow to use `make check` instead of `make ci-go-check`, following the OPA project approach.
- Previously, `ci-go-check` required spinning up a Go Docker environment on the first run; this is no longer needed with `make check`.
- Increased job timeout from 15 to 30 minutes to allow more time for linting, following the OPA project.

Signed-off-by: Akash Sawan <[email protected]>
Signed-off-by: tjons <[email protected]>
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.

Replace deprecated golint with golang-ci lint

2 participants