

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

id: link-http-format
message: When a link is provided it needs to have the right format.
severity: warning # error, warning, info, hint
language: Rust
rule:
    kind: string_literal
    inside:
        stopBy:
          kind: function_item
        any:
          - pattern: fn short_description
          - pattern: fn long_description
    has:
      kind: string_content
      any:
        - regex: .*https?://.*
