Skip to content

Commit 2fae0da

Browse files
committed
resolving conflicts
1 parent f811133 commit 2fae0da

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

pkg/cli/cli.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff 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

pkg/cli/git.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,6 @@ import (
1414
func (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
}

0 commit comments

Comments
 (0)