Skip to content

Commit

Permalink
Fix linter excluded rules
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Byrgazov <vladislav.byrgazov@xored.com>
  • Loading branch information
Vladislav Byrgazov committed Nov 21, 2024
1 parent 910fcd3 commit 43c1cec
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.23.1
go-version: 1.23.3
- name: Build
run: go build -race ./...

Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v5
with:
go-version: 1.23.1
go-version: 1.23.3
- name: Build container
run: docker build .
- name: Run tests
Expand Down
10 changes: 8 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,17 @@ linters:
- whitespace
issues:
exclude-rules:
- path: 'main.go'
linters:
- revive
text: 'package-comments: should have a package comment'
- path: main.go
linters:
- funlen
- gocritic
- revive
text: "Function 'main'"
- linters:
- govet
text: 'shadow: declaration of "err" shadows declaration at line'
exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 0
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ func createSriovInterposeEndpoint(ctx context.Context, config *Config, tlsConfig
return nil, err
}

if err = pci.UpdateConfig(config.PCIDevicesPath, config.PCIDriversPath, sriovConfig); err != nil {
if err := pci.UpdateConfig(config.PCIDevicesPath, config.PCIDriversPath, sriovConfig); err != nil {
return nil, err
}

Expand All @@ -398,7 +398,7 @@ func createSriovInterposeEndpoint(ctx context.Context, config *Config, tlsConfig
resourcePool := resource.NewPool(tokenPool, sriovConfig)

// Start device plugin server
if err = k8sdeviceplugin.StartServers(
if err := k8sdeviceplugin.StartServers(
ctx,
tokenPool,
config.ResourcePollTimeout,
Expand Down

0 comments on commit 43c1cec

Please sign in to comment.