Skip to content

Some rules present in analysis_options.yaml file are removed in some version of Dart #590

Closed
@iPriyanshu19

Description

@iPriyanshu19

Issue: Removal of Lint Rules in analysis_options.yaml

Description

In recent updates of Dart, several lint rules specified in the analysis_options.yaml file have been removed. This change impacts code quality checks and may lead to unintended code issues going unnoticed in projects that previously relied on these rules.

Steps to Reproduce

  1. Open an existing Dart project with a analysis_options.yaml file containing the following rules:
    linter:
      rules:
        - always_require_non_null_named_parameters
        - prefer_equal_for_default_values
  2. Upgrade Dart to the latest version.
  3. Run the analysis tool and observe that the specified rules are no longer applied.

Expected Behavior

The lint rules specified in analysis_options.yaml should remain active and continue to enforce code quality standards across the project.

Actual Behavior

The specified lint rules are either ignored or result in warnings indicating that they are no longer available.

Impact

  • Decreased code quality due to the lack of enforcement of important linting rules.
  • Increased technical debt as developers may not be aware of the missing rules.
  • Disruption to CI/CD processes that depend on these lint checks.

Suggested Solution

Consider reintroducing the removed rules or provide alternatives that serve the same purpose. Updating the official documentation to clarify the changes and recommend equivalent rules would also help developers adapt to the new standards.

Additional Information

  • Dart Version: 3.3.0 and 3.0.0 respectively
  • Example of affected analysis_options.yaml:
    linter:
      rules:
        - always_require_non_null_named_parameters
        - prefer_equal_for_default_values
  • Environment: [e.g., Flutter, Dart VM, etc.]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions