@@ -18,18 +18,15 @@ import (
1818 "globstar.dev/checkers"
1919 "globstar.dev/checkers/discover"
2020
21- // "globstar.dev/pkg/analysis"
2221 "globstar.dev/pkg/config"
2322 "globstar.dev/util"
2423)
2524
2625type Cli struct {
2726 // RootDirectory is the target directory to analyze
2827 RootDirectory string
29- // Checkers is a list of checkers that are applied to the files in `RootDirectory`
30- // Checkers []analysis.Checker
31- Config * config.Config
32- CmpHash string
28+ Config * config.Config
29+ CmpHash string
3330}
3431
3532func (c * Cli ) loadConfig () error {
@@ -427,39 +424,6 @@ func (c *Cli) RunCheckers(runBuiltinCheckers, runCustomCheckers bool) error {
427424
428425 result .numFilesChecked ++
429426
430- // run checker
431- // the first arg is empty, since the format for inbuilt Go-based checkers has changed
432- // TODO: factor it in later
433- // nonYamlAnalyzers := []*goAnalysis.Analyzer{}
434- // issues, err := goAnalysis.RunAnalyzers(c.RootDirectory, nonYamlAnalyzers, func(filename string) bool {
435- // if c.CmpHash != "" {
436- // _, isChanged := changedFileMap[filename]
437- // return isChanged
438- // }
439- // return true
440- // })
441-
442- // if err != nil {
443- // // parse error on a single file should not exit the entire analysis process
444- // // TODO: logging the below error message is not helpful, as it logs unsupported file types as well
445- // // fmt.Fprintf(os.Stderr, "Error parsing file %s: %s\n", path, err)
446- // return nil
447- // }
448-
449- // for _, issue := range issues {
450- // txt, _ := issue.AsText()
451- // log.Error().Msg(string(txt))
452-
453- // result.issues = append(result.issues, &goAnalysis.Issue{
454- // Filepath: issue.Filepath,
455- // Message: issue.Message,
456- // Severity: goAnalysis.Severity(issue.Severity),
457- // Category: goAnalysis.Category(issue.Category),
458- // Node: issue.Node,
459- // Id: issue.Id,
460- // })
461- // }
462-
463427 return nil
464428 })
465429
0 commit comments