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

id: single-to-backtick
message: Use backticks instead of single-quotes for adding inline code in strings, since backticks are properly rendered in markdown as inline code blocks.
severity: warning # error, warning, info, hint
language: Rust
rule:
  kind: string_content
  regex: \'(?<quoted>[^']+)\'
  inside:
    kind: function_item
    regex: .*description.*
    stopBy: end
# fix: $quoted
# utils: Extract repeated rule as local utility here.
# note: Add detailed explanation for the rule.
