Skip to content

Template rule⚓︎

Template rule demonstrating minimal syntax at the example of a forbidden test mapping.

Use rule⚓︎

Warning

Not for practical use. Rule is only provided as a minimal example.

In order to use this rule:

  1. Create configmap via:
    kubectl create configmap -n semgr8ns template-rule --from-file=rules/template-rule.yaml
    kubectl label configmap -n semgr8ns template-rule semgr8s/rule=true
    

Rule⚓︎

rules/template-rule.yaml
rules:
- id: template-rule
  message: Rule template.
  languages: [yaml]
  severity: INFO
  patterns:
    - pattern: |
        semgr8s-test: forbidden-test-label-e3b0c44298fc1c