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

Make strict-inference and strict-raw-types report as error instead of warning #59928

Open
zhenhao-ola opened this issue Jan 17, 2025 · 4 comments
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request type-question A question about expected behavior or functionality

Comments

@zhenhao-ola
Copy link

I enabled strict type check as per the Flutter documentation in my codebase. However, I found out that not all of them reports as error.

analyzer:
  language:
    strict-casts: true
    strict-inference: true
    strict-raw-types: true

strict-casts will be reported as error, which is wanted behaviour.

However, strict-inference and strict-raw-types will only report as warning in flutter analyze.

Is there any way to make strict-inference and strict-raw-types report as error instead of warning ?

@dart-github-bot
Copy link
Collaborator

Summary: User wants strict-inference and strict-raw-types analyzer options to produce errors, not warnings, for consistent strict type checking. Currently, only strict-casts behaves as expected.

@dart-github-bot dart-github-bot added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-question A question about expected behavior or functionality labels Jan 17, 2025
@zhenhao-ola
Copy link
Author

good bot

@scheglov
Copy link
Contributor

@srawlins

@scheglov scheglov added the P3 A lower priority bug or feature request label Jan 17, 2025
@srawlins
Copy link
Member

I expect we're actually going to move in the other direction, and make these all lint rules.

@zhenhao-ola can you say how the error/warning distinction affects your workflow? Why do you want it one way vs the other?

@lrhn lrhn removed the triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. label Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request type-question A question about expected behavior or functionality
Projects
None yet
Development

No branches or pull requests

5 participants