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

id: vague-id
message: IDs of rules should be descriptive and not contain vague string operations.
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
      any:
        - regex: .*prefer.*
        - regex: .*avoid.*
        - regex: .*replace.*
        - regex: .*use_.*
