run method
Runs the default syntactic scan and returns all diagnostics found.
Returns null if no configuration was found and no tier was set (caller should tell
the user to run init first), or if tier was set to an unknown value.
This is a purely syntactic pass (parseString, no resolution): it is
fast, but rules registered on addInstanceCreationExpression and any
type-based rule under-report — see runResolved for the resolved path.
Implementation
List<ScanDiagnostic>? run() {
final plan = _prepare();
if (plan == null) return null;
if (plan.files.isEmpty) return const [];
final registrations = _registerRules(
plan.rules,
() => ScanRuleContext(definingUnit: _dummyContextUnit()),
);
return _scanFiles(plan.files, registrations);
}