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: add GitHub Workflow for golangci-lint #365

Merged
merged 9 commits into from
Jun 12, 2023

Conversation

nixpanic
Copy link
Collaborator

@nixpanic nixpanic commented Jun 12, 2023

Based on the example in the golangci-lint GitHub Action documentnation.

Note: this PR is a draft until there are no linter issues reported anymore.

@nixpanic nixpanic force-pushed the workflow/golangci-lint branch from 959da6b to 14528f0 Compare June 12, 2023 07:09
Based on the example in the golangci-lint GitHub Action documentnation.

See-also: https://github.com/golangci/golangci-lint-action
Signed-off-by: Niels de Vos <[email protected]>
@nixpanic nixpanic force-pushed the workflow/golangci-lint branch from 14528f0 to 2b8096e Compare June 12, 2023 07:11
nixpanic added 6 commits June 12, 2023 09:16
…bHook validation

golangci-lint complains that `rscjLog` is not used. This seems to be
correct, as the validating WebHook for ReclaimSpaceCronJob used the
wrong logger.

Signed-off-by: Niels de Vos <[email protected]>
…rDriverNotFound`

The `errDriverNotFound` error is not used anymore.

Signed-off-by: Niels de Vos <[email protected]>
…in `Deploy()`

`Deploy()` always returns `nil`, even when
`wait.PollImmediateInfinite()` would return an error. At the moment, no
errors are returned while polling, everything seems to be handled. In
case this changes in the future, the error will be returned now.

Signed-off-by: Niels de Vos <[email protected]>
golangci-lint noticed thet `getSecret()` is not used. There probably is
no need for this function in `main.go` anyway, it would probably be
cleaner to fetch a Secret in the Controller or Side-Car when it is
needed.

Signed-off-by: Niels de Vos <[email protected]>
golangci-lint reports that `grpc.WithInsecure()` has been deprecated. It
can be replaced by `grps.WithTransportCredentials() and pass credentials
created with `insecure.NewCredentials()`.

Signed-off-by: Niels de Vos <[email protected]>
@nixpanic nixpanic force-pushed the workflow/golangci-lint branch from e060a34 to f606706 Compare June 12, 2023 08:12
nixpanic added 2 commits June 12, 2023 10:18
golangci-lint complains that `cfg` is not used. Other unit-tests use the
global `cfg` variable, so use that in the controller test suite too.

Signed-off-by: Niels de Vos <[email protected]>
@nixpanic nixpanic marked this pull request as ready for review June 12, 2023 08:36
@mergify mergify bot requested review from Rakshith-R and yati1998 June 12, 2023 08:36
@mergify mergify bot merged commit eea70e1 into csi-addons:main Jun 12, 2023
@nixpanic nixpanic mentioned this pull request Jun 14, 2023
4 tasks
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.

3 participants