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

ci: added staticcheck and vet as linters #225

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

ci: added staticcheck and vet as linters #225

wants to merge 2 commits into from

Conversation

mssola
Copy link
Contributor

@mssola mssola commented Apr 26, 2024

Following Go's standards, we should be using go vet and staticcheck as well.

@mssola mssola added the wip Work in progress label Apr 26, 2024
@mssola mssola requested a review from felixsch April 26, 2024 13:45
@mssola mssola self-assigned this Apr 26, 2024
@mssola
Copy link
Contributor Author

mssola commented Apr 26, 2024

Marked it as WIP because of the new cpu collector, which is not used and staticcheck rightfully detects its functions as not being used.

@felixsch
Copy link
Contributor

Nice lets get this one going, when we are ready with the collector then?

@mssola
Copy link
Contributor Author

mssola commented Apr 29, 2024

when we are ready with the collector then?

Yes, because right now the staticcheck is rightly complaining about functions not being used, like the ones from the CPU collector. Whenever we are using the new implementation, we can continue with this PR.

@mssola mssola force-pushed the staticcheck branch 9 times, most recently from b0028d9 to bb710c7 Compare May 24, 2024 05:27
@mssola mssola removed the wip Work in progress label May 24, 2024
@mssola
Copy link
Contributor Author

mssola commented May 24, 2024

In the end I had to split off the linting job into a new github action because running inside of the SLES container where the tests are run was basically impossible.

Following Go's standards, we should be using `go vet` and `staticcheck`
as well.

Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Tools like staticcheck have problems running on the SLES container being
used to run unit tests.

Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
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