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 flutter lints #1306

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

# The following lines activate a set of recommended lints.
include:
- package:lint/strict.yaml
- package:flutter_lints/flutter.yaml
- package:lint/strict.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to keep both lint packages?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It depends on what we want.

What do you think about these three rules : library_private_types_in_public_api, unintended_html_in_doc_comment, use_key_in_widget_constructors ? Should we add them ? If not I guess that we can keep only the lint package.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use_key_in_widget_constructors we definitely should have it, and library_private_types_in_public_api looks like a good practice too.

the third one we don't really care.

We should pick the set of rules that best fit our needs, and then adapt by manually enabling/disabling rule individually. Flutter lints is certainly a good choice so we can keep it. Have you found all the differences between flutter_lints and lint/strict?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes there is google sheets at the end of this article that show the differences but this is probably not up to date.

I'll disable the rule about html doc comment.


analyzer:
language:
Expand Down
Loading