
# yaml-language-server: $schema=https://raw.githubusercontent.com/ast-grep/ast-grep/main/schemas/rule.json

id: alpha-rule-id
message: IDs of rules should be lowercase letters separated by underscores.
severity: warning # error, warning, info, hint
language: Rust
rule:
    kind: string_literal
    inside:
      kind: block
      inside:
        kind: function_item
        pattern: fn id
    has:
      kind: string_content
      not:
        regex: ^(?:[a-z]+_)+[a-z]+$
