Skip to content

Commit

Permalink
fix linter issues
Browse files Browse the repository at this point in the history
Signed-off-by: AdamKorcz <[email protected]>
  • Loading branch information
AdamKorcz committed Nov 22, 2023
1 parent 1d3a6f3 commit b64e134
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion cmd/internal/scdiff/app/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ type Runner struct {
ctx context.Context
logger *log.Logger
enabledChecks checker.CheckNameToFnMap
enabledProbes []string
githubClient clients.RepoClient
gitlabClient clients.RepoClient
ossFuzz clients.RepoClient
Expand Down
2 changes: 1 addition & 1 deletion options/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func (o *Options) AddFlags(cmd *cobra.Command) {
&o.ProbesToRun,
FlagProbes,
o.ProbesToRun,
fmt.Sprintf("Probes to run."),
"Probes to run.",
)

// TODO(options): Extract logic
Expand Down
4 changes: 3 additions & 1 deletion probes/entries.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ var (
issueActivityByProjectMember.Probe: issueActivityByProjectMember.Run,
notCreatedRecently.Probe: notCreatedRecently.Run,
}

errProbeNotFound = errors.New("probe not found")

Check failure on line 160 in probes/entries.go

View workflow job for this annotation

GitHub Actions / generate-docs

undefined: errors

Check failure on line 160 in probes/entries.go

View workflow job for this annotation

GitHub Actions / generate-docs

undefined: errors

Check failure on line 160 in probes/entries.go

View workflow job for this annotation

GitHub Actions / generate-docs

undefined: errors

Check failure on line 160 in probes/entries.go

View workflow job for this annotation

GitHub Actions / unit-test

undefined: errors

Check failure on line 160 in probes/entries.go

View workflow job for this annotation

GitHub Actions / validate-docs

undefined: errors

Check failure on line 160 in probes/entries.go

View workflow job for this annotation

GitHub Actions / validate-docs

undefined: errors

Check failure on line 160 in probes/entries.go

View workflow job for this annotation

GitHub Actions / validate-docs

undefined: errors

Check failure on line 160 in probes/entries.go

View workflow job for this annotation

GitHub Actions / gitlab-integration-trusted

undefined: errors

Check failure on line 160 in probes/entries.go

View workflow job for this annotation

GitHub Actions / gitlab-integration-trusted

undefined: errors

Check failure on line 160 in probes/entries.go

View workflow job for this annotation

GitHub Actions / gitlab-integration-trusted

undefined: errors

Check failure on line 160 in probes/entries.go

View workflow job for this annotation

GitHub Actions / integration-trusted

undefined: errors

Check failure on line 160 in probes/entries.go

View workflow job for this annotation

GitHub Actions / integration-trusted

undefined: errors

Check failure on line 160 in probes/entries.go

View workflow job for this annotation

GitHub Actions / integration-trusted

undefined: errors

Check failure on line 160 in probes/entries.go

View workflow job for this annotation

GitHub Actions / build-scorecard

undefined: errors

Check failure on line 160 in probes/entries.go

View workflow job for this annotation

GitHub Actions / build-scorecard

undefined: errors

Check failure on line 160 in probes/entries.go

View workflow job for this annotation

GitHub Actions / build-scorecard

undefined: errors
)

//nolint:gochecknoinits
Expand All @@ -173,7 +175,7 @@ func GetProbeRunner(probeName string) (func(*checker.RawResults) ([]finding.Find
if runner, ok := probeRunners[probeName]; ok {
return runner, nil
}
return nil, fmt.Errorf("could not find probe")
return nil, fmt.Errorf("%w", errProbeNotFound)
}

func concatMultipleProbes(slices [][]ProbeImpl) []ProbeImpl {
Expand Down

0 comments on commit b64e134

Please sign in to comment.