Skip to content

Commit e1ace86

Browse files
author
Rahul Sharma
committed
fix linting
1 parent cf3131c commit e1ace86

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
cli.codecov.io:443
5858
api.codecov.io:443
5959
raw.githubusercontent.com:443
60+
get.helm.sh:443
6061
6162
- uses: actions/checkout@v4
6263
with:
@@ -69,8 +70,10 @@ jobs:
6970
- name: Vet
7071
run: make vet
7172

72-
- name: Lint
73-
run: make lint
73+
- name: lint
74+
uses: golangci/golangci-lint-action@v6
75+
with:
76+
version: latest
7477

7578
- name: Helm Lint
7679
run: make helm-lint
@@ -79,7 +82,7 @@ jobs:
7982
run: make test
8083

8184
- name: Upload coverage reports to Codecov
82-
uses: codecov/codecov-action@v5
85+
uses: codecov/codecov-action@v5.0.6
8386
with:
8487
files: ./coverage.out
8588
fail_ci_if_error: true

cloud/linode/cloud.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func newCloud() (cloudprovider.Interface, error) {
117117
if len(Options.IpHolderSuffix) > 23 {
118118
msg := fmt.Sprintf("ip-holder-suffix must be 23 characters or less: %s is %d characters\n", Options.IpHolderSuffix, len(Options.IpHolderSuffix))
119119
klog.Error(msg)
120-
return nil, fmt.Errorf(msg)
120+
return nil, fmt.Errorf("%s", msg)
121121
}
122122

123123
// create struct that satisfies cloudprovider.Interface

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func main() {
113113
linode.Options.KubeconfigFlag = command.Flags().Lookup("kubeconfig")
114114
if linode.Options.KubeconfigFlag == nil {
115115
msg := "kubeconfig missing from CCM flag set"
116-
sentry.CaptureError(ctx, fmt.Errorf(msg))
116+
sentry.CaptureError(ctx, fmt.Errorf("%s", msg))
117117
fmt.Fprintf(os.Stderr, "kubeconfig missing from CCM flag set"+"\n")
118118
os.Exit(1)
119119
}
@@ -122,7 +122,7 @@ func main() {
122122
_, network, err := net.ParseCIDR(externalSubnet)
123123
if err != nil {
124124
msg := fmt.Sprintf("Unable to parse %s as network subnet: %v", externalSubnet, err)
125-
sentry.CaptureError(ctx, fmt.Errorf(msg))
125+
sentry.CaptureError(ctx, fmt.Errorf("%s", msg))
126126
fmt.Fprintf(os.Stderr, "%v\n", msg)
127127
os.Exit(1)
128128
}

0 commit comments

Comments
 (0)