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

Add the lint package #113

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Add the lint package #113

wants to merge 1 commit into from

Conversation

passsy
Copy link

@passsy passsy commented Jan 24, 2020

Enables a larger set of lint checks than the one which were already enabled by adding the lint package.

After enabling the new checks flutter analyze reports 317 errors and 1925 warnings which will help to improve the source code.

Most errors are caused by implicit-casts: false which requires manual casting from dynamic to the proper type during assignment. This will become the default soon and is therefore recommended to be fixed.

I recommend fixing the errors when merging this PR (nobody likes red squiggly lines everywhere) and then start fixing the warnings over time.

Enables a larger set of lint checks than the one already enabled in analysis options
@hillelcoren
Copy link
Member

Thanks for creating the PR!

My understanding is that when NNBD is released they're also going to provide automated tools to help migrate the code, do you think corrections for these errors/warnings will be included?

@passsy
Copy link
Author

passsy commented Jan 28, 2020

It seems likely that implicit cast will be automatically converted to explicit casts. May be @stereotype441 and @MichaelRFairhurst know.

Some of the remaining 2k warning can fixed relatively quick with IDE support (i.e. adding the const keyword)
Screen-Shot-2020-01-28-14-45-36 24

But sadly there is not "Fix All" right now dart-lang/sdk#37228

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 this pull request may close these issues.

None yet

2 participants