[−][src]Crate rslint_core
Modules
directives | Directives used to configure or ignore rules. These take place of comments over nodes or comments at the top level. |
groups | |
rule_prelude | Commonly used items by rules. These include some AST definitions, and utilities. |
util | General utilities to make linting easier. |
Macros
declare_lint | A macro to easily generate rule boilerplate code. |
group | Macro for easily making a rule group hashmap.
This will call |
rule_tests | A macro for generating linter rule tests. |
Structs
CstRuleStore | |
DiagnosticBuilder | A simple builder for creating codespan diagnostics sequentially |
Label | A label describing an underlined region of code associated with a diagnostic. |
LintResult | The result of linting a file. |
RuleCtx | Context given to a rule when running it. |
RuleResult | The result of running a single rule on a syntax tree. |
Enums
Outcome | The overall result of running a single rule or linting a file. |
RuleLevel | The level configured for a rule. |
Severity | A severity level for diagnostic messages. |
Traits
CstRule | The main type of rule run by the runner. The rule takes individual
nodes inside of a Concrete Syntax Tree and checks them.
It may also take individual syntax tokens.
Rule must be all be |
Rule | A generic trait which describes things common to a rule regardless on what they run on. |
Span | A value which can be used as the range inside of a diagnostic. |
Functions
get_group_rules_by_name | Get a group's rules by the group name. |
get_rule_by_name | Get a rule by its kebab-case name. |
get_rule_suggestion | Get a suggestion for an incorrect rule name for things such as "did you mean ...?" |
lint_file | Lint a file with a specific rule store. |
run_rule |
Type Definitions
Diagnostic | The type of errors, warnings, and notes emitted by the linter. |