Skip to content

flutter analyze --flutter-repo should analyze analysis_options.yaml #127989

@goderbauer

Description

@goderbauer

flutter analyze --flutter-repo currently does not analyze the analysis_options.yaml at the root of the repository. This caused us to miss some warnings about deprecated lints in that file. The command should be updated to analyze that file as well since it is part of the repository and it may have issues reported by the analyzer.

Steps to repro the failure to report deprecated lints in that file:

  1. Add the deprecated lint iterable_contains_unrelated_type to the analysis_options.yaml at the root of the repository.
  2. Verify that the analyzer reports a deprecated lint when analyzing this specific file alone: flutter analyze analysis_options.yaml.
  3. Run flutter analyze --flutter-repo and observe that no deprecated lint is reported.

Expected Output:

   info • 'iterable_contains_unrelated_type' is deprecated and should be replaced by 'collection_methods_unrelated_type' • analysis_options.yaml:113:7 •
          deprecated_lint_hint_with_replacement

Actual Output: nothing reported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    toolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions