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
{{ message }}
Repository navigation
fix: resolve default rule parameters from included package configurations #317
After the migration to the new analyzer plugin system, support for resolving inherited configurations (include: package:...) and package-default rule parameters stopped working. As a result, projects could not share lint rule parameters or use shared options.
Solution
Implemented a proper configuration loader and parser that restores support for package-level configurations and rule suppression.
Key Components:
Package URI Resolution:
Implemented lib/src/common/parameter_parser/package_config_resolver.dart to find the nearest .dart_tool/package_config.json and resolve package: URIs into absolute file system paths.
Include Processing & Merging:
Added lib/src/common/parameter_parser/analysis_options_parser.dart to recursively traverse includes (including package: paths), merge default options, and handle cyclic dependencies.
Rule Application:
Wrapped rules in lib/src/models/proxy_analysis_rule.dart and lib/src/models/proxy_multi_analysis_rule.dart to apply merged settings and respect rule suppression.
Testing:
Added unit tests in test/src/common/parameter_parser/analysis_options_loader_test.dart to verify package include resolution, parameter merging, and cyclic imports.
Activity
custom_lintstoanalysis_server_plugin#244