AnalysisReporter class
Writes a combined analysis report to the project's reports/ directory.
Produces a single timestamped file that is overwritten on each debounce
cycle, so it always reflects the full cumulative data. Per-file
de-duplication in ProgressTracker prevents double-counting when the
analyzer re-visits a file.
Initialize once via initialize, then call scheduleWrite on each file visit or violation. Call reset to start a fresh report file.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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 Properties
- projectRoot → String?
-
The project root directory, or null if not initialized.
no setter
- reportPath → String?
-
Full path to the report file, or null if not initialized.
no setter
Static Methods
-
dateFolder(
String timestamp) → String -
Extract the date folder name (
YYYYMMDD) from a session timestamp. -
dispose(
) → void - Explicit disposal for long-running hosts (tests, tooling) that need to release the debounce Timer without clearing the rest of the report state. Fix for require_dispose_pattern: satisfies the rule's check for a named cleanup hook while preserving the lighter-weight reset path.
-
initialize(
String projectRoot) → void - Initialize the reporter with the project root directory.
-
reset(
) → void - Reset state for a fresh analysis session.
-
scheduleWrite(
) → void - Schedule report writing after a debounce period.
-
setAnalysisConfig(
ReportConfig config) → void - Store the analysis configuration for inclusion in report headers.
-
setOwaspLookup(
Map< String, OwaspMapping> lookup) → void - Store the OWASP lookup map for the structured JSON export.
-
writeNow(
) → void - Write the report immediately, canceling any pending debounce.