Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
iPriyanshu19 opened this issue Oct 1, 2024 · 0 comments · May be fixed by #598
Open

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

iPriyanshu19 opened this issue Oct 1, 2024 · 0 comments · May be fixed by #598

Comments

@iPriyanshu19
Copy link

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.]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant