Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
Signed-off-by: Praveen Rewar <[email protected]>
  • Loading branch information
praveenrewar committed May 16, 2024
1 parent 34e5a3e commit 183d6f1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion pkg/vendir/directory/staging_dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/vendir/directory/symlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/concurrent_processes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 183d6f1

Please sign in to comment.