Skip to content

Commit

Permalink
🐛 Handle custom rules for .net framework (#316) (#318)
Browse files Browse the repository at this point in the history
* 🐛 Handle custom rules for .net framework



* simplify path



---------

Signed-off-by: David Zager <dzager@redhat.com>
Signed-off-by: Cherry Picker <noreply@github.com>
Co-authored-by: David Zager <dzager@redhat.com>
  • Loading branch information
konveyor-ci-bot[bot] and djzager authored Aug 22, 2024
1 parent dd48d69 commit 215adcb
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions cmd/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -2217,14 +2217,20 @@ func (a *analyzeCommand) analyzeDotnetFramework(ctx context.Context) error {
}

if a.enableDefaultRulesets {
args = append(args, fmt.Sprintf("--rules=%s/", "C:"+filepath.FromSlash(RulesetPath)))
args = append(args, fmt.Sprintf("--rules=C:%s", filepath.FromSlash(RulesetPath)))
}

if len(a.rules) > 0 {
for index, rule := range a.rules {
volumes[rule] = fmt.Sprintf("C:%v-%d", filepath.FromSlash(CustomRulePath), index)
ruleVols, err := a.getRulesVolumes()
if err != nil {
a.log.V(1).Error(err, "failed to get rule volumes for analysis")
return err
}
for key, value := range ruleVols {
volumes[key] = "C:" + filepath.FromSlash(value)
}
args = append(args, fmt.Sprintf("--rules=%s/", CustomRulePath))

args = append(args, fmt.Sprintf("--rules=C:%s", filepath.FromSlash(CustomRulePath)))
}

if a.jaegerEndpoint != "" {
Expand Down

0 comments on commit 215adcb

Please sign in to comment.