Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Ortel <[email protected]>
  • Loading branch information
jortel committed Jul 30, 2024
1 parent cde5687 commit 9c12535
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions cmd/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ var LvRegex = regexp.MustCompile(`(\D+)(\d(?:[\d\.]*\d)?)([\+-])?$`)

// Rules settings.
type Rules struct {
Path string `json:"path"`
Repository *api.Repository `json:"repository"`
Identity *api.Ref `json:"identity"`
Labels Labels `json:"labels"`
rules []string
extract []string
Path string `json:"path"`
Repository *api.Repository `json:"repository"`
Identity *api.Ref `json:"identity"`
Labels Labels `json:"labels"`
extractLabels []string
rules []string
}

// Build assets.
Expand All @@ -59,7 +59,7 @@ func (r *Rules) Build() (err error) {
if err != nil {
return
}
err = r.Labels.extract(r.extract)
err = r.Labels.extract(r.extractLabels)
if err != nil {
return
}
Expand Down Expand Up @@ -113,7 +113,7 @@ func (r *Rules) addFiles() (err error) {
n++
}
if n > 0 {
r.extract = append(r.extract, ruleDir)
r.extractLabels = append(r.extractLabels, ruleDir)
}
return
}
Expand Down Expand Up @@ -244,7 +244,7 @@ func (r *Rules) addRuleSetRepository(ruleset *api.RuleSet) (err error) {
return
}
ruleDir := path.Join(rootDir, ruleset.Repository.Path)
r.extract = append(r.extract, ruleDir)
r.extractLabels = append(r.extractLabels, ruleDir)
r.append(ruleDir)
return
}
Expand Down Expand Up @@ -277,7 +277,7 @@ func (r *Rules) addRepository() (err error) {
return
}
ruleDir := path.Join(rootDir, r.Repository.Path)
r.extract = append(r.extract, ruleDir)
r.extractLabels = append(r.extractLabels, ruleDir)
r.append(ruleDir)
return
}
Expand Down

0 comments on commit 9c12535

Please sign in to comment.