Skip to content

Commit

Permalink
Merge pull request #964 from cloudflare/issue-959
Browse files Browse the repository at this point in the history
Update rule/label docs
  • Loading branch information
prymitive authored Apr 25, 2024
2 parents 9b84f30 + 1d9bdb2 commit d45c805
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions docs/checks/rule/label.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,23 +142,25 @@ Or you can disable it per rule by adding a comment to it. Example:
If you want to disable only individual instances of this check
you can add a more specific comment.

If `value` is set:

```yaml
# pint disable rule/label($label:$required)
# pint disable rule/label($label:$required:$value)
```

Where `$label` is the label name and `$required` is the configure value
of `required` option.
If `value` is NOT set:

```yaml
groups:
- name: ...
rules:
# pint disable rule/label($pattern:$required)
- record: ...
expr: ...
# pint disable rule/label($label:$required)
```

Example rule:
Where:

- `$label` is the label name.
- `$required` is the configured value of the `required` option.
- `$value` is the _anchored_ value of the `value` option (if set).

Example pint rule:

```js
label "severity" {
Expand All @@ -170,7 +172,7 @@ label "severity" {
Example comment disabling that rule:

```yaml
# pint disable rule/label(severity:true)
# pint disable rule/label(severity:true:^(warning|critical)$)
```

## How to snooze it
Expand All @@ -182,6 +184,6 @@ You can disable this check until given time by adding a comment to it. Example:
```

Where `$TIMESTAMP` is either use [RFC3339](https://www.rfc-editor.org/rfc/rfc3339)
formatted or `YYYY-MM-DD`.
Adding this comment will disable `rule/label` *until* `$TIMESTAMP`, after that
formatted or `YYYY-MM-DD`.
Adding this comment will disable `rule/label` _until_ `$TIMESTAMP`, after that
check will be re-enabled.

0 comments on commit d45c805

Please sign in to comment.