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

Update leancode_lint to use new language modes and remove strong-mode #96

Closed
bartekpacia opened this issue Mar 16, 2023 · 5 comments · Fixed by #97
Closed

Update leancode_lint to use new language modes and remove strong-mode #96

bartekpacia opened this issue Mar 16, 2023 · 5 comments · Fixed by #97

Comments

@bartekpacia
Copy link
Contributor

bartekpacia commented Mar 16, 2023

When using leancode_lint on Flutter beta, it spits out:

Screenshot 2023-03-16 at 11 35 38 PM

another example:

Screenshot 2023-03-16 at 11 39 02 PM

The cause lies here:

analyzer:
  strong-mode:
    implicit-casts: false
    implicit-dynamic: false

We should change it to:

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

as suggested by Customizing static analysis docs.

Learn more:

cc: @Albert221 @shilangyu

@shilangyu
Copy link
Contributor

Sounds good to me, I think we can proceed with the change, but without the strict-raw-types field since we did not use it before

@Albert221
Copy link
Member

I'm okay with the changes, as well as adding the strict-raw-types. We should remember to bump minimum Dart version and the package MAJOR though

@shilangyu
Copy link
Contributor

We should remember to bump minimum Dart version

To which version? Afaik the current constraint is correct (?), >=2.17.0

@bartekpacia
Copy link
Contributor Author

I think the best way to test this is to install Dart 2.17 and just see if it works.

@shilangyu
Copy link
Contributor

It seems to be working well with dart 2.17

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.

3 participants