DartRule class abstract

A rule that inspects the parsed AST of a Dart file.

The engine parses each Dart file once, and only when at least one DartRule is active — text-only runs never pay for the analyzer. Rules that just need string literals share the literal-collecting visitor instead of getting a third subtype.

Inheritance
Implementers

Constructors

DartRule()
const

Properties

cwe int
CWE id without the prefix, e.g. 319 for CWE-319.
no setterinherited
description String
What the rule detects and why it matters.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
Stable identifier, SD###.
no setterinherited
masvs String
OWASP MASVS requirement id, e.g. MASVS-NETWORK-1.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
severity Severity
no setterinherited
title String
Short human-readable name of the check.
no setterinherited

Methods

check(ScanFile file, CompilationUnit unit) List<Finding>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited