fix: support package-level analysis options and rule suppression#318
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the solid_lints plugin to support nested and included analysis_options.yaml files, resolving package imports and relative paths, and introduces proxy wrappers to dynamically check for disabled or suppressed rules. Feedback on these changes highlights several critical issues: a platform-specific path resolution bug in PackageConfigResolver that bypasses the ResourceProvider abstraction; an in-place mutation of seenPaths in AnalysisOptionsParser that incorrectly flags diamond dependencies as cyclic; a potential memory leak caused by caching unmodifiable YamlMap and YamlList objects; and a stale cache bug in AnalysisOptionsLoader that prevents detecting newly created configuration files during active IDE sessions.
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.
…ardization and fix path resolution logic
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the solid_lints analyzer plugin to dynamically check for disabled rules and respect standard rule suppressions configured under analyzer: errors:. It introduces AnalysisOptionsParser and PackageConfigResolver to parse configurations and resolve package imports. The review feedback highlights several critical improvements: supporting multiple include files and recursively merging their configurations, restricting error suppression parsing to only the plugin's prefix to prevent collisions, and resolving caching issues in PackageConfigResolver that could lead to stale package configurations in long-running IDE sessions.
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.
…port multiple analysis option includes
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the analysis options loading mechanism to support resolving and merging included configurations (both relative and package paths) and introduces proxy rules to dynamically manage enabled/disabled states. Feedback on the changes highlights several critical issues: a potential compile-time error in lib/main.dart due to a non-exhaustive switch expression on non-sealed classes, incorrect handling of false values under analyzer: errors: which unexpectedly enables rules, and a failure to handle null values under diagnostics: to re-enable rules. Additionally, there are potential runtime crashes identified, specifically a TypeError in AvoidUsingApiParameters when parsing non-map entries and a FormatException in PackageConfigResolver when parsing malformed package URIs.
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.
…o prevent crashes on malformed input
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for resolving included analysis options files and handling explicitly disabled rules. It refactors the analysis options loading logic into a dedicated parser and resolver, and introduces proxy wrappers to dynamically check if rules are disabled. The review feedback highlights critical compile-time errors, such as using a non-existent isScheme method on Uri and a non-exhaustive switch expression on lintRule. Additionally, several improvements are suggested to use type patterns with variable bindings for safer and more idiomatic Dart pattern matching.
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 #317