BaselineConfig class

A snapshot of findings accepted as pre-existing, loaded from a project's .flutter_auditor_baseline.json, so future runs only fail on newly introduced findings.

Fingerprinted by (audit id, file, description) rather than by line number or byte offset: those shift with unrelated edits elsewhere in the file, which would make the baseline silently "expire" findings it shouldn't. The tradeoff is that two distinct findings of the same type in the same file collapse to one fingerprint — acceptable for a baseline, whose job is deciding what's pre-existing, not deduplicating precisely.

Constructors

BaselineConfig({Set<String> fingerprints = const {}})
const

Properties

fingerprints Set<String>
final
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

apply(List<AuditRunResult> results, ProjectContext context) → (List<AuditRunResult>, int, Set<String>)
Returns a copy of results with baselined issues handled by severity: medium/low/info baselined issues are removed entirely (like IgnoreConfig), but critical/high baselined issues stay visible in the report — a serious finding shouldn't silently vanish just because it's pre-existing. Their ids are returned in exemptFromFailOn so they don't block the build a second time; the caller is responsible for excluding them from its fail-on check.
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

Static Methods

fingerprintFor(String auditId, SecurityIssue issue, ProjectContext context) String
fingerprintsFor(List<AuditRunResult> results, ProjectContext context) Set<String>
Every fingerprint present in results, for writing a new baseline.