File tree Expand file tree Collapse file tree 2 files changed +0
-21
lines changed
Expand file tree Collapse file tree 2 files changed +0
-21
lines changed Original file line number Diff line number Diff line change @@ -417,15 +417,6 @@ func (c *Cli) RunCheckers(runBuiltinCheckers, runCustomCheckers bool) error {
417417 return nil
418418 }
419419
420- // Only run if the incremental flag is provided.
421- if c .DiffMode {
422- // Skip the path if it's not included in the changed files.
423- _ , isChanged := changedFileMap [path ]
424- if ! isChanged {
425- return nil
426- }
427- }
428-
429420 if d .IsDir () {
430421 if c .Config .ShouldExcludePath (path ) || slices .Contains (defaultIgnoreDirs , d .Name ()) {
431422 return filepath .SkipDir
Original file line number Diff line number Diff line change @@ -14,16 +14,6 @@ import (
1414func (c * Cli ) GetChangedFiles (compareHash string ) ([]string , error ) {
1515 changedFiles := []string {}
1616 repo , err := git .PlainOpen (c .RootDirectory )
17- if err != nil {
18- return nil , fmt .Errorf ("Could not open the Directory." )
19- }
20-
21- // Define references for the current and previous commits
22- head := "HEAD"
23- prev := "HEAD~1"
24-
25- // Resolve the hash for the latest commit
26- latestCommitHash , err := repo .ResolveRevision (plumbing .Revision (head ))
2717 if err != nil {
2818 return changedFiles , fmt .Errorf ("failed to open git repository: %w" , err )
2919 }
@@ -112,7 +102,5 @@ func (c *Cli) GetChangedFiles(compareHash string) ([]string, error) {
112102 changedFiles = append (changedFiles , filepath .Join (c .RootDirectory , file ))
113103 }
114104
115-
116-
117105 return changedFiles , nil
118106}
You can’t perform that action at this time.
0 commit comments