File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ package engine
1717import (
1818 "context"
1919 "io/fs"
20+ "os"
2021 "path/filepath"
2122 "strings"
2223 "sync"
@@ -177,5 +178,5 @@ func (e *Engine) isInvalidExtension(path string) bool {
177178
178179// isFileFromGitFolder check if a file is in a .git folder
179180func (e * Engine ) isFileFromGitFolder (path string ) bool {
180- return strings .Contains (path , ".git" )
181+ return strings .Contains (path , ".git" + string ( os . PathSeparator ) )
181182}
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ func TestEngineRun(t *testing.T) {
5555 projectPath : filepath .Join ("text" , "examples" ),
5656 extensions : []string {AcceptAnyExtension },
5757 rules : newRuleMock ([]Finding {{}}, nil ),
58- expectedFindings : 225 ,
58+ expectedFindings : 237 ,
5959 err : false ,
6060 },
6161 {
You can’t perform that action at this time.
0 commit comments