Compare commits
2 Commits
e98272c218
...
072582d9cb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
072582d9cb | ||
| 920de1c512 |
2
bin/test
2
bin/test
@@ -1,2 +1,2 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
go test git.lab.xmaxsmi.dev/xmaxsmi/editorconfig-cli/editorconfig $*
|
go test github.com/amyboyd/editorconfig-cli/editorconfig $*
|
||||||
|
|||||||
@@ -69,21 +69,6 @@ func FindSourceFiles(searchPaths []string) ([]string, error) {
|
|||||||
return nil, cli.NewExitError(errMessage, 2)
|
return nil, cli.NewExitError(errMessage, 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if this is a specific file path (exists and is a file)
|
|
||||||
if fileInfo, err := os.Stat(searchPath); err == nil && !fileInfo.IsDir() {
|
|
||||||
// Don't run on files inside dot directories.
|
|
||||||
if !containsDotDirectoryRegex.MatchString(searchPath) {
|
|
||||||
// For explicitly specified files, always include them regardless of extension
|
|
||||||
files = append(files, searchPath)
|
|
||||||
}
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the file doesn't exist, skip it silently (don't error out)
|
|
||||||
if _, err := os.Stat(searchPath); err != nil {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
_ = filepath.Walk(searchPath, func(path string, fileInfo os.FileInfo, err error) error {
|
_ = filepath.Walk(searchPath, func(path string, fileInfo os.FileInfo, err error) error {
|
||||||
// Don't add paths that don't exist.
|
// Don't add paths that don't exist.
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user