forked from cloudflare/pint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cloudflare#230 from cloudflare/owner
Fix rule/owner line reporting
- Loading branch information
Showing
5 changed files
with
83 additions
and
27 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
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,43 @@ | ||
--- | ||
layout: default | ||
parent: Checks | ||
grand_parent: Documentation | ||
--- | ||
|
||
# rule/owner | ||
|
||
This check can be used to enforce rule ownership comments used by `pint watch` | ||
command when exporting metrics about problems detected in rules. | ||
|
||
If you see this check reports it means that `--require-owner` flag is enabled | ||
for pint and a rule file is missing required ownership comment. | ||
|
||
To set a rule owner add a `# pint file/owner $owner` comment in a file, to set | ||
an owner for all rules in that file. You can also set an owner per rule, by adding | ||
`# pint rule/owner $owner` comment around given rule. | ||
|
||
Example: | ||
|
||
```yaml | ||
# pint file/owner bob | ||
|
||
- alert: ... | ||
expr: ... | ||
|
||
# pint rule/owner alice | ||
- alert: ... | ||
expr: ... | ||
``` | ||
## Configuration | ||
This check doesn't have any configuration options. | ||
## How to enable it | ||
This check is enabled only if you pass `--require-owner` flag to `pint lint` | ||
or `pint ci` commands. | ||
|
||
## How to disable it | ||
|
||
Remove `--require-owner` flag from pint CLI arguments. |