Config Cheat Sheet â
This cheat sheet provides a concise overview of ast-grep's linter rule YAML configuration. It's designed as a handy reference for common usage.
Basic Information â
Core details that identify and define your rule and miscellaneous keys for documentation and custom data.
| âšī¸ Basic Information | ||
yaml | đ A unique, descriptive identifier for the rule. | |
yaml | đ The programming language the rule applies to. | |
yaml | đ A URL to the rule's documentation. | |
yaml | đ metadata A dictionary for custom data related to the rule. | |
Finding â
Keys for specifying what code to search for.
| đ Finding Code | ||
yaml | đ¯ The core | |
yaml | âī¸ Additional | |
yaml | đ ī¸ A dictionary of reusable utility rules. Use them in | |
Patching â
Keys for defining how to automatically fix the found code.
| đ ī¸ Patching Code | ||
yaml | đŠ | |
yaml | đŠ | |
yaml | đ§ A | |
yaml | đ§ Fix also accepts | |
yaml | âī¸ A list of | |
Linting â
Keys for configuring the messages and severity of reported issues.
| đĻ Linting | ||
yaml | â ī¸ The | |
yaml | đŦ A concise | |
yaml | đ More detailed | |
yaml | đ¨ Customized | |
yaml | â
Glob | |
yaml | â Glob patterns to exclude files from the rule. | |