start method

  1. @override
FutureOr<void> start()
override

Loads plugin configuration (enabled rules, severity overrides, etc.) from analysis_options / SAROPA env vars before rules are registered.

Logs the start event via PluginLogger — the entry will be buffered in memory until SaropaContext._ensureConfigLoadedFromProjectRoot calls PluginLogger.setProjectRoot on the first analyzed file, then flushed to reports/.saropa_lints/plugin.log so users have a visible surface confirming the plugin actually started.

Implementation

@override
FutureOr<void> start() {
  PluginLogger.log('Plugin.start() — loading initial config');
  try {
    loadNativePluginConfig();
  } catch (e, st) {
    PluginLogger.log(
      'loadNativePluginConfig failed in Plugin.start()',
      error: e,
      stackTrace: st,
    );
    // Defensive: plugin still registers with defaults
  }
}