You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Failed to load options:: Exception:: Not found import_analysis_options.yaml file at the root of your project.
FileSystemException:: Cannot open file, path = '/Users/mjhd/Projects/project_root/packages/package1/analysis_options.yaml' (OS Error:: No such file or directory, errno = 2)
#0 new Rules.fromOptionsFile (package::import_lint/src/import_lint_options.dart::58::7)
#1 new ImportLintOptions.init
Dart Analyzer can read an options file in a parent directory of the target package's root.
If the analyzer can’t find an analysis options file at the package root, it walks up the directory tree, looking for one. If no file is available, the analyzer defaults to standard checks.
The plugin failed to start by following error:
CLI also fails to start by the same error.
My project structure looks like:
Dart Analyzer can read an options file in a parent directory of the target package's root.
https://dart.dev/guides/language/analysis-options#the-analysis-options-file
To support this behavior,
context?.contextRoot.optionsFile
should be used to load the options file.similar code in
dart-code-metrics
: https://github.com/dart-code-checker/dart-code-metrics/blob/7d8269b420d7b40562b72149f92949b288cf40f1/lib/src/analyzer_plugin/analyzer_plugin.dart#L236Thank you for creating this useful package, I will use this in my project!
The text was updated successfully, but these errors were encountered: