Skip to content

Migrate golangci-lint to a container for local run #8486

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

Closed
vdemeester opened this issue Jan 14, 2025 · 4 comments · Fixed by #8661
Closed

Migrate golangci-lint to a container for local run #8486

vdemeester opened this issue Jan 14, 2025 · 4 comments · Fixed by #8661
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.

Comments

@vdemeester
Copy link
Member

Now that we have a workflow, we should migrate the way user can run golangci-lint.

Today, we use tools/go.mod to specify the version, but it is already specified in the workflow.
The idea would be the following:

  • Removing golangci-lint import in tools
  • Create a Makefile target that runs a containers (using docker or podman) that runs the version specified in workflow and use that for the golangci/golangci-lint:{version} tag.
@vdemeester vdemeester added kind/feature Categorizes issue or PR as related to a new feature. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Jan 14, 2025
@malinjawi
Copy link

Hey @vdemeester thanks for raising this issue. I would like to tackle this issue.

@vdemeester
Copy link
Member Author

/assign @malinjawi

@twoGiants
Copy link
Member

Hi @vdemeester, hi @malinjawi!

It looks like this issue can be closed. It was done by those PRs #8577, #8594.

The only thing left is to remove this comment in the Makefile 😃 . I will open a small PR with corrections in the documentation and will remove this line also.

twoGiants added a commit to twoGiants/tekton-pipeline that referenced this issue Mar 24, 2025
Change the docker registry entry for KO to "localhost:5000". The former
entry "kind.local" lead to an error when deploying the local pipeline
build.

Fix a broken link in the testing documentation and remove a leftover
comment from the makefile which was targeted to a non existing
configuration.

Issue tektoncd#8660
Issue tektoncd#8486

Signed-off-by: Stanislav Jakuschevskij <[email protected]>
twoGiants added a commit to twoGiants/tekton-pipeline that referenced this issue Mar 24, 2025
Change the docker registry entry for KO to `localhost:5000`. The former
entry `kind.local` lead to an error when deploying the local pipeline
build.

Fix a broken link in the testing documentation and remove a leftover
comment from the makefile which was targeted to a non existing
configuration.

Add optional installation recommendation for `yamllint` so that it can
be used when running `pre-commit` locally otherwise it will show a
`Failed` message when linting yaml files.

Issue tektoncd#8660
Issue tektoncd#8486

Signed-off-by: Stanislav Jakuschevskij <[email protected]>
@twoGiants
Copy link
Member

Hi @vdemeester! The PR #8661 removes the comment. I think this issue can be closed. I added the "Closes #..." to my PR.

tekton-robot pushed a commit that referenced this issue Mar 24, 2025
Change the docker registry entry for KO to `localhost:5000`. The former
entry `kind.local` lead to an error when deploying the local pipeline
build.

Fix a broken link in the testing documentation and remove a leftover
comment from the makefile which was targeted to a non existing
configuration.

Add optional installation recommendation for `yamllint` so that it can
be used when running `pre-commit` locally otherwise it will show a
`Failed` message when linting yaml files.

Issue #8660
Issue #8486

Signed-off-by: Stanislav Jakuschevskij <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.
Projects
Status: Done
3 participants