Skip to content

dart fix with specific codes always applies pubspec related fixes #60871

Open
@josh-burton

Description

@josh-burton

This issues relates to the dart fix CLI command.

Dart fix supports supplying specific issue codes, to restrict the issues that the tool fixes and applies.

This works for dart related issues, but the tool seems to always apply pubspec related fixes, even when those codes are not specified.

Here is a sample demonstrating the problem: https://github.com/josh-burton/dart_fix_bug

To reproduce, run dart fix --apply --code=unused_import

Expected result: only the unused_import fix should be applied.
Actual result: both the unused_import fix and the missing_dependency fix are applied.

  • Dart 3.8.1
  • MacOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions