Compare commits

..

2 Commits

Author SHA1 Message Date
Maksim Smirnov
072582d9cb fix changed not saved to the file 2025-08-23 09:50:12 +02:00
920de1c512 Update go.mod 2025-08-23 08:49:14 +02:00
3 changed files with 2 additions and 17 deletions

View File

@@ -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 $*

View File

@@ -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 {

View File

@@ -1,7 +1,7 @@
package main package main
import ( import (
"git.lab.xmaxsmi.dev/xmaxsmi/editorconfig-cli/editorconfig" "github.com/amyboyd/editorconfig-cli/editorconfig"
"os" "os"
) )