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 fixes for fixable canonical lints #2408

Closed
7 of 11 tasks
pq opened this issue Jan 8, 2021 · 7 comments
Closed
7 of 11 tasks

add fixes for fixable canonical lints #2408

pq opened this issue Jan 8, 2021 · 7 comments

Comments

@pq
Copy link
Member

pq commented Jan 8, 2021

Add fixes for:

  • prefer_typing_uninitialized_variables
  • avoid_function_literals_in_foreach_calls
  • avoid_null_checks_in_equality_operators
  • avoid_returning_null_for_void
  • exhaustive_cases
  • prefer_initializing_formals
  • prefer_is_not_operator (covered by an assist)
  • prefer_void_to_null
  • unnecessary_getters_setters
  • unnecessary_string_escapes
  • unnecessary_string_interpolations (dart-lang/sdk@f9c3c09) cheers @parlough!

See: #2405

@parlough
Copy link
Member

parlough commented Jan 11, 2021

@pq Just so I don't overlap with work already being done, any suggestions for one to attempt next?

I was thinking prefer_is_not_operator if no one is currently working on that :)

@bwilkerson
Copy link
Member

That one is already covered by an assist. See ConvertIntoIsNot.

It looks like this list didn't take assists into account.

@pq
Copy link
Member Author

pq commented Jan 11, 2021

It looks like this list didn't take assists into account.

ah... and so maybe I should add that assist processor scraping code to the scorecard after all? 🤔

@pq
Copy link
Member Author

pq commented Jan 11, 2021

@parlough: if you decide to take a look at one, maybe just post your intention here? I can do the same.

Thanks!

@bwilkerson
Copy link
Member

... so maybe I should add that assist processor scraping code to the scorecard after all?

I don't think there's any connection between assists and the lints that they overlap with, so I don't think you can automate that check.

if you decide to take a look at one ...

Just don't forget to try it in the IDE first to see whether there's an assist that applies.

@pq
Copy link
Member Author

pq commented Jan 12, 2021

I don't think there's any connection between assists and the lints that they overlap with

sorry, right, i meant w/ metadata added to capture that in server source but I think it's overkill. probably better to just track those few exceptions here.

@bwilkerson
Copy link
Member

Closing this in favor of the more complete list in dart-lang/sdk#45932. I believe that there were lints added to the core, recommended and flutter lists after this issue was opened, hence the reason the other list is more complete.

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

No branches or pull requests

3 participants