diff --git a/.golangci.yml b/.golangci.yml index bac4ae04..8e285001 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -14,6 +14,11 @@ linters-settings: regexp: copyright-year: 20[0-9][0-9] template-path: code-header-template.txt + revive: + enable-all: true + rules: + - name: dot-imports + disabled: true issues: max-issues-per-linter: 0 max-same-issues: 0 diff --git a/pkg/vendir/directory/staging_dir.go b/pkg/vendir/directory/staging_dir.go index fbae9777..d223f1c0 100644 --- a/pkg/vendir/directory/staging_dir.go +++ b/pkg/vendir/directory/staging_dir.go @@ -77,7 +77,7 @@ func (d StagingDir) CopyExistingFiles(rootDir string, stagingPath string, ignore // Consider WalkDir in the future for efficiency (Go 1.16) // Walk root path above to determine files that can be ignored - err := filepath.Walk(rootPath, func(path string, info os.FileInfo, err error) error { + err := filepath.Walk(rootPath, func(path string, _ os.FileInfo, err error) error { if err != nil { return err } diff --git a/pkg/vendir/directory/symlink.go b/pkg/vendir/directory/symlink.go index f101cd82..f899805b 100644 --- a/pkg/vendir/directory/symlink.go +++ b/pkg/vendir/directory/symlink.go @@ -18,7 +18,7 @@ func ValidateSymlinks(path string) error { return err } rootSegments := strings.Split(absRoot, string(os.PathSeparator)) - return filepath.WalkDir(path, func(path string, info fs.DirEntry, err error) error { + return filepath.WalkDir(path, func(path string, info fs.DirEntry, _ error) error { if info.Type()&os.ModeSymlink == os.ModeSymlink { resolvedPath, err := filepath.EvalSymlinks(path) if err != nil { diff --git a/test/e2e/concurrent_processes_test.go b/test/e2e/concurrent_processes_test.go index 3ceaa858..c5d96f66 100644 --- a/test/e2e/concurrent_processes_test.go +++ b/test/e2e/concurrent_processes_test.go @@ -39,7 +39,7 @@ directories: wg := sync.WaitGroup{} for i := 0; i < processes; i++ { wg.Add(1) - go func(n int, t *testing.T, wg *sync.WaitGroup) { + go func(n int, _ *testing.T, wg *sync.WaitGroup) { defer wg.Done() // RunWithOpts invokes t.Fatal on error vendir.RunWithOpts(