Rule
interface Rule
Lint or formatting rule contributed by a rule set.
Rule implementations are loaded through a RuleSetProvider and run after SQLDelight accepts the source file.
Properties
Link copied to clipboard
Whether this rule can run by default before user configuration and auto applicability are resolved.
Link copied to clipboard
Default severity used when user configuration does not override it.
Link copied to clipboard
Deprecation metadata when this rule is kept only for compatibility.
Link copied to clipboard
Typed options supported by this rule.
Link copied to clipboard
Dialect ID required when this rule is resolved with Auto.
Functions
Link copied to clipboard
Returns whether this rule applies to the current context when enablement is Auto.
Link copied to clipboard
fun Rule.reportSqlStatementMatches(context: RuleContext, reporter: DiagnosticReporter, message: String, hashLineComments: Boolean = false, findMatch: (statement: List<SqlToken>) -> SqlTokenMatch?)
Tokenizes the current file and reports matches found per statement.
Link copied to clipboard
fun Rule.reportSqlTokenMatch(context: RuleContext, reporter: DiagnosticReporter, message: String, match: SqlTokenMatch)
Reports a diagnostic for match using this rule's default severity.
Link copied to clipboard
Runs this rule against the current context.