Skip to content

chore: lint code and improve linter settings #57

chore: lint code and improve linter settings

chore: lint code and improve linter settings #57

Triggered via pull request January 29, 2024 21:21
Status Failure
Total duration 53s
Artifacts
This run and associated checks have been archived and are scheduled for deletion. Learn more about checks retention

lint-code.yaml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 3 warnings
lint: main.go#L15
use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)
lint: pkg/controller/serviceaccount/rolebindings.go#L14
Function 'ensureRoles' is too long (101 > 60) (funlen)
lint: pkg/controller/serviceaccount/serviceaccount.go#L78
Function 'Reconcile' is too long (89 > 60) (funlen)
lint: pkg/controller/serviceaccount/tokens.go#L11
File is not `gci`-ed with --skip-generated -s standard -s default -s prefix(github.com/projectcapsule/capsule-addon-fluxcd) (gci)
lint: pkg/controller/serviceaccount/globaltenantresources.go#L7
File is not `gci`-ed with --skip-generated -s standard -s default -s prefix(github.com/projectcapsule/capsule-addon-fluxcd) (gci)
lint: pkg/controller/serviceaccount/rolebindings.go#L8
File is not `gci`-ed with --skip-generated -s standard -s default -s prefix(github.com/projectcapsule/capsule-addon-fluxcd) (gci)
lint: pkg/controller/serviceaccount/tokens.go#L63
singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
lint: pkg/controller/serviceaccount/serviceaccount.go#L202
(*ServiceAccountReconciler).buildKubeconfig - result 1 (error) is always nil (unparam)
lint: pkg/controller/serviceaccount/serviceaccount.go#L89
expressions should not be cuddled with blocks (wsl)
lint: pkg/controller/serviceaccount/serviceaccount.go#L108
if statements should only be cuddled with assignments (wsl)
lint
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
lint
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
lint: pkg/controller/serviceaccount/serviceaccount.go#L27
exported: type name will be used as serviceaccount.ServiceAccountReconciler by other packages, and that stutters; consider calling this Reconciler (revive)