fix: resolve rules configuration being ignored in nested directories#310
Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates the lint configurations from custom_lint to solid_lints and updates AnalysisOptionsLoader to resolve nested analysis_options.yaml files starting from the defining unit's directory rather than the package root. It also updates the YAML parsing logic to support both root-level and plugin-level configurations. Feedback suggests using Dart 3 pattern matching to safely extract the diagnostics block instead of using unsafe as casts, which would also allow removing the newly introduced _OptionsMap typedef.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
… and prevent crashes on invalid configurations
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the analysis options configuration format from custom_lint to solid_lints and modifies the rules from a list to a map format. It also updates AnalysisOptionsLoader to resolve analysis_options.yaml by traversing upwards from the directory of the file being analyzed rather than starting at the package root. The feedback identifies two issues: first, the directory traversal loop terminates before checking the root directory, which can be resolved by restructuring the loop; second, parsing nested configuration maps using Map<String, Object?>.from can throw a runtime TypeError if the keys are not strings, which can be avoided by defensively copying the map.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…tring keys and fixing infinite loop in path traversal
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the configuration format in the analysis options files from custom_lint to solid_lints diagnostics. It also refactors AnalysisOptionsLoader to resolve the nearest analysis_options.yaml file relative to the file being analyzed rather than the package root, and improves YAML parsing robustness with additional test coverage. Feedback suggests wrapping the synchronous file read operation (readAsStringSync()) in a try-catch block to prevent potential crashes if the file is inaccessible.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request migrates the lint configurations from custom_lint to solid_lints and updates the AnalysisOptionsLoader to resolve the nearest analysis_options.yaml relative to the file being analyzed rather than the package root. It also hardens the YAML parsing logic to prevent crashes on malformed configurations and adds comprehensive unit tests to verify these changes. There are no review comments to address.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Closes #192 |
Closes #309