Skip to content

Commit

Permalink
set severity to warning
Browse files Browse the repository at this point in the history
Signed-off-by: Dentrax <[email protected]>
  • Loading branch information
Dentrax committed Jul 22, 2024
1 parent d973ff2 commit 0c086a1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion pkg/lint/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ var AllRules = func(l *Linter) Rules { //nolint:gocyclo
{
Name: "valid-version-stream",
Description: "check the provides and tag filter if version stream suffix is passed to package name",
Severity: SeverityError,
Severity: SeverityWarning,
LintFunc: func(c config.Configuration) error {
// This regex captures a string that ends with a semantic version (semver) suffix.
// It returns two groups:
Expand Down
24 changes: 12 additions & 12 deletions pkg/lint/rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,16 +415,16 @@ func TestLinter_Rules(t *testing.T) {
},
{
file: "version-stream-missing-provides-1.2.yaml",
minSeverity: SeverityError,
minSeverity: SeverityWarning,
want: EvalResult{
File: "version-stream-missing-provides-1.2",
Errors: EvalRuleErrors{
{
Rule: Rule{
Name: "valid-version-stream",
Severity: SeverityError,
Severity: SeverityWarning,
},
Error: fmt.Errorf("[valid-version-stream]: package is version streamed but version-stream-missing-provides=${{package.full-version}} is missing on dependencies.provides (ERROR)"),
Error: fmt.Errorf("[valid-version-stream]: package is version streamed but version-stream-missing-provides=${{package.full-version}} is missing on dependencies.provides (WARNING)"),
},
},
},
Expand All @@ -433,16 +433,16 @@ func TestLinter_Rules(t *testing.T) {
},
{
file: "version-stream-missing-update-tagfilter-1.2.yaml",
minSeverity: SeverityError,
minSeverity: SeverityWarning,
want: EvalResult{
File: "version-stream-missing-update-tagfilter-1.2",
Errors: EvalRuleErrors{
{
Rule: Rule{
Name: "valid-version-stream",
Severity: SeverityError,
Severity: SeverityWarning,
},
Error: fmt.Errorf("[valid-version-stream]: package is version streamed but tag filter 1.2 is mismatch on update.github (ERROR)"),
Error: fmt.Errorf("[valid-version-stream]: package is version streamed but tag filter 1.2 is mismatch on update.github (WARNING)"),
},
},
},
Expand All @@ -451,16 +451,16 @@ func TestLinter_Rules(t *testing.T) {
},
{
file: "version-stream-missing-update-tagfilter-1.2-999.yaml",
minSeverity: SeverityError,
minSeverity: SeverityWarning,
want: EvalResult{
File: "version-stream-missing-update-tagfilter-1.2",
Errors: EvalRuleErrors{
{
Rule: Rule{
Name: "valid-version-stream",
Severity: SeverityError,
Severity: SeverityWarning,
},
Error: fmt.Errorf("[valid-version-stream]: package is version streamed but tag filter 1.2 is mismatch on update.github (ERROR)"),
Error: fmt.Errorf("[valid-version-stream]: package is version streamed but tag filter 1.2 is mismatch on update.github (WARNING)"),
},
},
},
Expand All @@ -469,16 +469,16 @@ func TestLinter_Rules(t *testing.T) {
},
{
file: "version-stream-mismatch-version-1.2.yaml",
minSeverity: SeverityError,
minSeverity: SeverityWarning,
want: EvalResult{
File: "version-stream-mismatch-version-1.2",
Errors: EvalRuleErrors{
{
Rule: Rule{
Name: "valid-version-stream",
Severity: SeverityError,
Severity: SeverityWarning,
},
Error: fmt.Errorf("[valid-version-stream]: package is version streamed but package.version 1.7 starts with different than given version stream 1.2 (ERROR)"),
Error: fmt.Errorf("[valid-version-stream]: package is version streamed but package.version 1.7 starts with different than given version stream 1.2 (WARNING)"),
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ pipeline:
test:
pipeline:
- runs: "echo 'test'"

update:
enabled: true
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ pipeline:
test:
pipeline:
- runs: "echo 'test'"

update:
enabled: true

0 comments on commit 0c086a1

Please sign in to comment.