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

Add golangci-lint gh action #5045

Merged
merged 11 commits into from
Jul 15, 2022
Merged

Add golangci-lint gh action #5045

merged 11 commits into from
Jul 15, 2022

Conversation

antgamdia
Copy link
Contributor

@antgamdia antgamdia commented Jul 8, 2022

Description of the change

This PR just adds golangci-lint as a github action. We were thinking of adding this linter in building time, but perhaps the GitHub action could be also an interesting option (it adds the checks directly as annotations, so perhaps it's better, not sure yet).

Benefits

Our go code will pass the linters before being merged.

Possible drawbacks

N/A

Applicable issues

Additional information

N/A

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
@netlify
Copy link

netlify bot commented Jul 8, 2022

Deploy Preview for kubeapps-dev canceled.

Name Link
🔨 Latest commit 90fd6ac
🔍 Latest deploy log https://app.netlify.com/sites/kubeapps-dev/deploys/62cdb77f0f71030009b58b13

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
@antgamdia
Copy link
Contributor Author

This PR is not displaying the "visual" checks because there is already failing code and, also, the PR is not adding any golang code.
It should show something like:

image

Marking as a draft while we start fixing the existing issues.

@antgamdia antgamdia marked this pull request as draft July 8, 2022 11:18
@castelblanque
Copy link
Collaborator

This is a great help. We are going to get rid of a lot of unused stuff, while keeping our source code "in shape" 😄

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
@antgamdia
Copy link
Contributor Author

(Note that this PR should pass once #5060, #5059 and #5058 get merged into this branch)

…5060)

* Fix issues in kubeops

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Fix issues in assety-syncer

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Fix isses in apprepository-controller

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
* Fix linter issues in test files

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Fix linter issues

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Fix issues

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

* Fix errata

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
as it is just being used by an in-progress unit test

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
@antgamdia antgamdia marked this pull request as ready for review July 12, 2022 18:11
@antgamdia
Copy link
Contributor Author

Tests finally passing :)

Copy link
Collaborator

@castelblanque castelblanque left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@antgamdia antgamdia merged commit be7a37f into main Jul 15, 2022
@antgamdia antgamdia deleted the addGHLinter branch July 15, 2022 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add golangci-lint to our golang build images Evaluate code linters/formaters at server-side
3 participants