[analyzer] how to use AnalysisOptionsFileConfig
in testing analyzer_plugin
#49987
Labels
legacy-area-analyzer
Use area-devexp instead.
I am trying to fix some part of #49559, and couldn't find a way to control
analysis_options.yaml
, so it is read by the test method.In sdk/259720,
writeTestPackageAnalysisOptionsFile
writes the file, howeverresolvedUnit.session.analysisContext.analysisOptions.lintRules
doesn't seem to pick the changes.In
analysis_server
, there is a similar method, with TODO to useAnalysisOptionsFileConfig
sdk/pkg/analysis_server/test/src/g3/fixes_test.dart
Lines 190 to 192 in e8b67cc
so I understand the correct way is to use
AnalysisOptionsFileConfig
from theanalyzer
insdk/pkg/analyzer/test/src/dart/resolution/context_collection_resolution.dart
Line 42 in e8b67cc
but I am not sure how this is possible to be called from the
analyzer_plugin
, since it is intest
main folder, not insrc
The text was updated successfully, but these errors were encountered: