Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulait committed Nov 26, 2024
1 parent cf3131c commit 0d9feeb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
cli.codecov.io:443
api.codecov.io:443
raw.githubusercontent.com:443
get.helm.sh:443
- uses: actions/checkout@v4
with:
Expand All @@ -69,8 +70,10 @@ jobs:
- name: Vet
run: make vet

- name: Lint
run: make lint
- name: lint
uses: golangci/golangci-lint-action@v6
with:
version: latest

- name: Helm Lint
run: make helm-lint
Expand All @@ -79,7 +82,7 @@ jobs:
run: make test

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@v4
with:
files: ./coverage.out
fail_ci_if_error: true
Expand Down
2 changes: 1 addition & 1 deletion cloud/linode/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func newCloud() (cloudprovider.Interface, error) {
if len(Options.IpHolderSuffix) > 23 {
msg := fmt.Sprintf("ip-holder-suffix must be 23 characters or less: %s is %d characters\n", Options.IpHolderSuffix, len(Options.IpHolderSuffix))
klog.Error(msg)
return nil, fmt.Errorf(msg)
return nil, fmt.Errorf("%s", msg)
}

// create struct that satisfies cloudprovider.Interface
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func main() {
linode.Options.KubeconfigFlag = command.Flags().Lookup("kubeconfig")
if linode.Options.KubeconfigFlag == nil {
msg := "kubeconfig missing from CCM flag set"
sentry.CaptureError(ctx, fmt.Errorf(msg))
sentry.CaptureError(ctx, fmt.Errorf("%s", msg))
fmt.Fprintf(os.Stderr, "kubeconfig missing from CCM flag set"+"\n")
os.Exit(1)
}
Expand All @@ -122,7 +122,7 @@ func main() {
_, network, err := net.ParseCIDR(externalSubnet)
if err != nil {
msg := fmt.Sprintf("Unable to parse %s as network subnet: %v", externalSubnet, err)
sentry.CaptureError(ctx, fmt.Errorf(msg))
sentry.CaptureError(ctx, fmt.Errorf("%s", msg))
fmt.Fprintf(os.Stderr, "%v\n", msg)
os.Exit(1)
}
Expand Down

0 comments on commit 0d9feeb

Please sign in to comment.