isScanIntegrationDisabled function

bool isScanIntegrationDisabled(
  1. String projectRoot
)

True when saropa_lints was switched off for this project: the plugin block is commented out AND a file on disk records the "off" choice. A plain scan without --tier then reports "scan skipped" and exits 0, so hooks do not fail on a switched-off project.

The records, in order:

  1. "saropaLints.enabled" in .vscode/settings.json, at projectRoot or one folder up (the extension accepts a project one level below the workspace folder). An explicit true wins over record 2.
  2. .dart_tool/saropa_lints/plugin_ownership.json, which the extension writes only when its Disable commented out a live block.

Not visible from here: the setting in a .code-workspace file or in the user's global settings. Such a project is scanned.

Implementation

bool isScanIntegrationDisabled(String projectRoot) {
  if (!hasCommentedOutPluginBlock(projectRoot)) return false;
  final root = p.normalize(p.absolute(projectRoot));
  final enabled =
      _vscodeEnabledSetting(root) ?? _vscodeEnabledSetting(p.dirname(root));
  if (enabled != null) return !enabled;
  return _extensionOwnsDisable(root);
}