Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippSieber committed Jun 13, 2024
1 parent 1af6785 commit 2cbc107
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions internal/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ import (
"gopkg.in/yaml.v3"
)

var manifestFilePatterns map[string]*regexp.Regexp
var manifestIgnoreFilePattern *regexp.Regexp
var (
manifestFilePatterns map[string]*regexp.Regexp
manifestIgnoreFilePattern *regexp.Regexp
)

// InitializePatterns pre-compiles manifest file name patterns
func (config *ToolConfig) InitializePatterns() {
Expand Down
6 changes: 5 additions & 1 deletion internal/pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,11 @@ func TestGetManifestType(t *testing.T) {
"gradle": "(.*/)?build\\.gradle(\\.kts)?",
"github-actions": "\\.github/workflows/.*\\.yml",
}
InitializePatterns(manifestFilePatterns)

config := ToolConfig{
ManifestPatterns: manifestFilePatterns,
}
config.InitializePatterns()

for _, tt := range []struct {
fullPath string
Expand Down

0 comments on commit 2cbc107

Please sign in to comment.