Skip to content

Commit

Permalink
chore: fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
afdesk committed Jan 15, 2025
1 parent 2922084 commit 2fee9f8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion check/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func (t testItem) evaluate(s string) *testOutput {

match, value, err := t.findValue(s)
if err != nil {
fmt.Fprintf(os.Stderr, err.Error())
fmt.Fprint(os.Stderr, err.Error())
return failTestItem(err.Error())
}

Expand Down
4 changes: 2 additions & 2 deletions check/test_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ func TestTestExecute(t *testing.T) {
c.check.AuditEnvOutput = c.strEnv
res, err := c.check.execute()
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}
if !res.testResult {
t.Errorf("Test ID %v - expected:%v, got:%v", c.check.ID, true, res)
Expand Down Expand Up @@ -334,7 +334,7 @@ func TestTestExecuteExceptions(t *testing.T) {
c.Check.AuditConfigOutput = c.str
res, err := c.Check.execute()
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}
if res.testResult {
t.Errorf("expected:%v, got:%v", false, res)
Expand Down
2 changes: 1 addition & 1 deletion cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var runCmd = &cobra.Command{
exitWithError(fmt.Errorf("error validating targets: %v", err))
}
if len(targets) > 0 && !valid {
exitWithError(fmt.Errorf(fmt.Sprintf(`The specified --targets "%s" are not configured for the CIS Benchmark %s\n Valid targets %v`, strings.Join(targets, ","), bv, benchmarkVersionToTargetsMap[bv])))
exitWithError(fmt.Errorf(`The specified --targets "%s" are not configured for the CIS Benchmark %s\n Valid targets %v`, strings.Join(targets, ","), bv, benchmarkVersionToTargetsMap[bv]))
}

// Merge version-specific config if any.
Expand Down

0 comments on commit 2fee9f8

Please sign in to comment.