Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
go-version: ^1.19
- uses: actions/checkout@master
- name: Run linter
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v7
with:
version: v1.64
args: -E=gofmt,unused,ineffassign,revive,misspell,copyloopvar,asciicheck,bodyclose,contextcheck --timeout=30m0s
version: v2.10
args: -E=errcheck,govet,unused,ineffassign,staticcheck,revive,misspell,asciicheck,bodyclose,dogsled,durationcheck,errname,forbidigo --timeout=30m0s
verify-helm:
name: Verify Helm
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trivy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install go
uses: actions/setup-go@v6
with:
go-version: 1.24.13
go-version: 1.25.7

- name: Build an image from Dockerfile
run: |
Expand Down
51 changes: 40 additions & 11 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,41 @@
linters-settings:
depguard:
version: "2"

linters:
default: none
enable:
- staticcheck
settings:
staticcheck:
checks:
- "S*"
depguard:
rules:
main:
files:
- $all
- "!$test"
allow:
- $gostd
- k8s.io
- sigs.k8s.io
- github.com
exclusions:
generated: lax
presets:
- comments
- std-error-handling
- common-false-positives
- legacy
rules:
main:
files:
- $all
- "!$test"
allow:
- $gostd
- k8s.io
- sigs.k8s.io
- github.com
# unused-parameter is a new revive rule not present in v1's bundled revive.
- linters:
- revive
text: "^unused-parameter:"
# var-naming package name checks are new in v2's revive (v1 only checked variable names).
- linters:
- revive
text: "^var-naming: avoid"

formatters:
enable:
- gofmt
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/kubernetes-csi/csi-driver-nfs

go 1.24.0
go 1.25.0

require (
github.com/container-storage-interface/spec v1.11.0
Expand Down
2 changes: 1 addition & 1 deletion pkg/nfs/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func setKeyValueInMap(m map[string]string, key, value string) {

func waitForPathNotExistWithTimeout(path string, timeout time.Duration) error {
// Loop until the path no longer exists or the timeout is reached
timeoutTime := time.Now().Add(time.Duration(timeout) * time.Second)
timeoutTime := time.Now().Add(timeout)
for {
if _, err := os.Lstat(path); err != nil {
if os.IsNotExist(err) {
Expand Down
Loading