Skip to main content

Module queries

Module queries 

Source
Expand description

Per-category node-kind classification rules.

Each sub-module declares the tree-sitter node kinds that map to a built-in pattern category. Two classifiers are provided:

Category names are stable from Milestone 6 forward. Renaming any name is a breaking change requiring a MIGRATION_NOTES.md entry.

Modules§

async_patterns
Node kinds classified as async-concurrency patterns.
class_hierarchy
Node kinds classified as class-hierarchy patterns.
data_access
Node kinds classified as data-access patterns.
error_handling
Node kinds classified as error-handling patterns.
logging
Node kinds that conceptually belong to the logging category.
resource_management
Node kinds classified as resource-management patterns.
state_management
Node kinds classified as state-management patterns.
type_assertions
Node kinds classified as type-assertion/cast patterns.

Constants§

ALL_CATEGORIES
All built-in category names in stable alphabetical order.

Functions§

category_for_node_kind
Maps a tree-sitter node_kind to the built-in category it belongs to.
classify_hint
Classify a PatternHintInput using both node kind and callee-text inspection.