Skip to content

ci: add GitHub Workflow for golangci-lint#365

Merged
mergify[bot] merged 9 commits into
csi-addons:mainfrom
nixpanic:workflow/golangci-lint
Jun 12, 2023
Merged

ci: add GitHub Workflow for golangci-lint#365
mergify[bot] merged 9 commits into
csi-addons:mainfrom
nixpanic:workflow/golangci-lint

Conversation

@nixpanic

@nixpanic nixpanic commented Jun 12, 2023

Copy link
Copy Markdown
Member

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 <ndevos@ibm.com>
@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 <ndevos@ibm.com>
…rDriverNotFound`

The `errDriverNotFound` error is not used anymore.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
…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 <ndevos@ibm.com>
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 <ndevos@ibm.com>
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 <ndevos@ibm.com>
Signed-off-by: Niels de Vos <ndevos@ibm.com>
@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 <ndevos@ibm.com>
Signed-off-by: Niels de Vos <ndevos@ibm.com>
@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
black-dragon74 pushed a commit to black-dragon74/kubernetes-csi-addons that referenced this pull request Jan 6, 2026
Syncing latest changes from devel for csi-addons
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