Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
JAORMX committed Aug 23, 2023
1 parent 10aed73 commit 0397b98
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions internal/engine/rule_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ import (
"path/filepath"
"testing"

"github.com/stacklok/mediator/internal/engine"
"github.com/stretchr/testify/require"

"github.com/stacklok/mediator/internal/engine"
)

func TestExampleRulesAreValidatedCorrectly(t *testing.T) {
Expand All @@ -32,7 +33,7 @@ func TestExampleRulesAreValidatedCorrectly(t *testing.T) {
require.NoError(t, err, "failed to parse example policy")

// open rules in example directory
filepath.Walk("../../examples/github/rule-types", func(path string, info os.FileInfo, err error) error {
err = filepath.Walk("../../examples/github/rule-types", func(path string, info os.FileInfo, err error) error {
// skip directories
if info.IsDir() {
return nil
Expand All @@ -48,6 +49,7 @@ func TestExampleRulesAreValidatedCorrectly(t *testing.T) {
t.Parallel()

// open file
//nolint:gosec // this is a test
f, err := os.Open(path)
require.NoError(t, err, "failed to open file %s", path)
defer f.Close()
Expand Down Expand Up @@ -77,4 +79,5 @@ func TestExampleRulesAreValidatedCorrectly(t *testing.T) {

return nil
})
require.NoError(t, err, "failed to walk rule types directory")
}

0 comments on commit 0397b98

Please sign in to comment.