Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/pint/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func tryDecodingYamlError(e string) (int, string) {
if err != nil {
return 1, e
}
return line + 1, parts[2]
return line, parts[2]
}
return 1, e
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/pint/tests/0004_fail_invalid_yaml.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ cmp stderr stderr.txt
-- stderr.txt --
level=error msg="Failed to parse file content" error="yaml: line 4: did not find expected key" path=rules/bad.yaml
level=info msg="File parsed" path=rules/ok.yml rules=1
rules/bad.yaml:5: did not find expected key (pint/parse)
- xx
rules/bad.yaml:4: did not find expected key (pint/parse)


rules/ok.yml:2: syntax error: unclosed left bracket (promql/syntax)
expr: sum(foo[5m)
Expand Down
4 changes: 2 additions & 2 deletions cmd/pint/tests/0010_syntax_check.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ cmp stderr stderr.txt

-- stderr.txt --
level=error msg="Failed to parse file content" error="yaml: line 6: did not find expected '-' indicator" path=rules/1.yaml
rules/1.yaml:7: did not find expected '-' indicator (pint/parse)
alert: Bad
rules/1.yaml:6: did not find expected '-' indicator (pint/parse)


level=info msg="Problems found" Fatal=1
level=fatal msg="Fatal error" error="problems found"
Expand Down