Skip to content

Commit

Permalink
Merge pull request #68 from coreruleset/improve-renumbering-check-output
Browse files Browse the repository at this point in the history
fix(github): improve test renumbering check output
fzipi authored Dec 3, 2022
2 parents ba52eaa + 0831b85 commit f01e1ab
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions cmd/util_renumber_tests.go
Original file line number Diff line number Diff line change
@@ -50,6 +50,12 @@ RULE_ID is the ID of the rule, e.g., 932100, or the test file name.`,
if err != nil {
return err
}

// The following errors are not command related
cmd.SilenceUsage = true
if rootValues.output == gitHub {
cmd.SilenceErrors = true
}
ctxt := context.New(rootValues.workingDirectory.String())
renumberer := util.NewTestRenumberer()
if processAll {
2 changes: 1 addition & 1 deletion util/renumber_tests.go
Original file line number Diff line number Diff line change
@@ -95,7 +95,7 @@ func (t *TestRenumberer) processFile(filePath string, checkOnly bool, gitHubOutp
}

if gitHubOutput {
fmt.Printf("::warning::Test file not properly numbered")
fmt.Printf("::warning::Test file not properly numbered: %s\n", path.Base(filePath))
}

if checkOnly {

0 comments on commit f01e1ab

Please sign in to comment.