Skip to content

Commit

Permalink
Don't consider .mdiff or .sdiff files in discoverTestData (#637)
Browse files Browse the repository at this point in the history
Signed-off-by: egibs <[email protected]>
  • Loading branch information
egibs authored Nov 18, 2024
1 parent 862d64b commit 0209157
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/refresh/refresh.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func discoverTestData(rc Config) (map[string]string, error) {

ext := filepath.Ext(path)
switch ext {
case ".simple", ".md", ".json", ".mdiff", ".sdiff":
case ".simple", ".md", ".json":
relPath, err := filepath.Rel(rc.TestDataPath, path)
if err != nil {
return fmt.Errorf("get relative path: %w", err)
Expand All @@ -57,8 +57,6 @@ func discoverTestData(rc Config) (map[string]string, error) {

if _, err := os.Stat(fullSamplePath); err == nil {
testFiles[path] = fullSamplePath
} else if !strings.Contains(path, ".mdiff") && !strings.Contains(path, ".sdiff") {
fmt.Printf("Warning: No sample file found for test file %s\n", path)
}
}
return nil
Expand Down

0 comments on commit 0209157

Please sign in to comment.