loadOutputConfigFromProjectRoot function
Load max_issues and output from analysis_options_custom.yaml in projectRoot.
Call this when the project root is first known (e.g. from first analyzed file),
so config is found even when the plugin runs with cwd in a temp directory.
Safe to call multiple times; env vars still take precedence over file.
Implementation
void loadOutputConfigFromProjectRoot(String projectRoot) {
try {
final content = _readProjectFile(
'analysis_options_custom.yaml',
projectRoot,
);
if (content != null) _loadOutputConfig(content);
} on Object catch (e, st) {
PluginLogger.log(
'loadOutputConfigFromProjectRoot failed',
error: e,
stackTrace: st,
);
}
}