-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
249 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
pint.ok --no-color lint --min-severity=info rules | ||
! stdout . | ||
cmp stderr stderr.txt | ||
|
||
-- stderr.txt -- | ||
level=INFO msg="Finding all rules to check" paths=["rules"] | ||
rules/1.yml:4 Warning: This comment is not a valid pint control comment: unexpected comment suffix: "this line" (pint/comment) | ||
4 | # pint ignore/line this line | ||
|
||
rules/2.yml:4 Information: This file was excluded from pint checks. (ignore/file) | ||
4 | # pint ignore/file | ||
|
||
level=INFO msg="Problems found" Warning=1 Information=1 | ||
-- rules/1.yml -- | ||
groups: | ||
- name: g1 | ||
rules: | ||
# pint ignore/line this line | ||
- record: up:count | ||
expr: count(up == 1) | ||
-- rules/2.yml -- | ||
groups: | ||
- name: g1 | ||
rules: | ||
# pint ignore/file | ||
- record: up:count | ||
expr: count(up == 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
layout: default | ||
parent: Checks | ||
grand_parent: Documentation | ||
--- | ||
|
||
# pint/comment | ||
|
||
You will only ever see this check reporting problems if you have a file | ||
with a comment that looks like one of pint control comments | ||
(see [page](../../ignoring.md)) but pint cannot parse it. | ||
|
||
This might be, for example, when you're trying to disable some checks | ||
for a specific rule using `# pint disable ...`, but the comment is not | ||
"touching" any rule and so pint cannot apply it. | ||
|
||
Valid rule specific comments: | ||
|
||
```yaml | ||
# pint disable promql/series(my_metric) | ||
- record: foo | ||
expr: sum(my_metric) without(instance) | ||
|
||
- record: foo | ||
# pint disable promql/series(my_metric) | ||
expr: sum(my_metric) without(instance) | ||
``` | ||
Invalid comment that's not attached to any rule: | ||
```yaml | ||
# pint disable promql/series(my_metric) | ||
|
||
- record: foo | ||
expr: sum(my_metric) without(instance) | ||
``` | ||
## Configuration | ||
This check doesn't have any configuration options. | ||
## How to enable it | ||
This check is enabled by default. | ||
## How to disable it | ||
You cannot disable this check. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.