Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitecba0c6

Browse files
chore: appease linter
1 parent4aeb7b3 commitecba0c6

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

‎agent/agentcontainers/api.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ func (api *API) discoverDevcontainerProjects() error {
473473
func (api*API)discoverDevcontainersInProject(projectPathstring)error {
474474
patterns,err:=ignore.ReadPatterns(api.fs,projectPath)
475475
iferr!=nil {
476-
returnfmt.Errorf("read git ignore patterns: %w",err)
476+
returnxerrors.Errorf("read git ignore patterns: %w",err)
477477
}
478478

479479
matcher:=gitignore.NewMatcher(patterns)

‎agent/agentcontainers/ignore/dir.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ func FilePathToParts(path string) []string {
2727
returncomponents
2828
}
2929

30-
funcreadIgnoreFile(fs afero.Fs,pathstring) ([]gitignore.Pattern,error) {
30+
funcreadIgnoreFile(fileSystem afero.Fs,pathstring) ([]gitignore.Pattern,error) {
3131
varps []gitignore.Pattern
3232

33-
data,err:=afero.ReadFile(fs,filepath.Join(path,".gitignore"))
33+
data,err:=afero.ReadFile(fileSystem,filepath.Join(path,".gitignore"))
3434
iferr!=nil&&!errors.Is(err,os.ErrNotExist) {
3535
returnnil,err
3636
}
@@ -47,7 +47,7 @@ func readIgnoreFile(fs afero.Fs, path string) ([]gitignore.Pattern, error) {
4747
funcReadPatterns(fileSystem afero.Fs,pathstring) ([]gitignore.Pattern,error) {
4848
ps,_:=readIgnoreFile(fileSystem,path)
4949

50-
iferr:=afero.Walk(fileSystem,path,func(pathstring,info fs.FileInfo,errerror)error {
50+
iferr:=afero.Walk(fileSystem,path,func(pathstring,info fs.FileInfo,_error)error {
5151
if!info.IsDir() {
5252
returnnil
5353
}

‎agent/agentcontainers/ignore/dir_test.go‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import (
44
"fmt"
55
"testing"
66

7-
"github.com/coder/coder/v2/agent/agentcontainers/ignore"
87
"github.com/stretchr/testify/require"
8+
9+
"github.com/coder/coder/v2/agent/agentcontainers/ignore"
910
)
1011

1112
funcTestFilePathToParts(t*testing.T) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp