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

[FR] Add the rules to analysis_options.yaml based on AppFlowy Flutter Style Guide #56

Closed
1 task done
LucasXu0 opened this issue Apr 11, 2023 · 3 comments
Closed
1 task done
Assignees
Labels
editor features related to the rich-text editor help wanted Extra attention is needed

Comments

@LucasXu0
Copy link
Collaborator

LucasXu0 commented Apr 11, 2023

Description

We should add rules to analysis_options.ymal, located in frontend/analysis_options.yaml, based on AppFlowy Flutter Style Guide

Impact

This will help format the code and reduce the time required for code reviewing.

Additional Context

Reference

Please DO NOT close this issue. We will keep this issue open to continue discussing which rules should be added.

@LucasXu0 LucasXu0 changed the title [FR] x [FR] Add the rules to analysis_options.yaml based on AppFlowy Flutter Style Guide Apr 11, 2023
@LucasXu0 LucasXu0 added the help wanted Extra attention is needed label Apr 11, 2023
@Xazin
Copy link
Collaborator

Xazin commented Apr 11, 2023

I can work on this.

I have one question though, according to the style guide, we should declare the type for all variables. There is a lint for this: https://dart-lang.github.io/linter/lints/always_specify_types.html

I want to know your opinion on this specific lint before I add it, since it's quite a lot of work.

Xazin added a commit to Xazin/appflowy-editor that referenced this issue Apr 11, 2023
Xazin added a commit to Xazin/appflowy-editor that referenced this issue Apr 11, 2023
@LucasXu0
Copy link
Collaborator Author

I think 'always_specify_types' is a bit redundant. There are other more useful lints that we can add now.

Like,

prefer_final_fields
prefer_final_in_for_each
prefer_final_locals
prefer_final_parameters

Xazin added a commit to Xazin/appflowy-editor that referenced this issue Apr 12, 2023
LucasXu0 pushed a commit that referenced this issue Apr 12, 2023
Xazin added a commit to Xazin/appflowy-editor that referenced this issue Apr 13, 2023
@annieappflowy annieappflowy added the editor features related to the rich-text editor label Apr 19, 2023
@Xazin
Copy link
Collaborator

Xazin commented Apr 20, 2023

I'll do a PR for the rest of the lints once most of the PRs are merged, such that there is less work in rebasing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor features related to the rich-text editor help wanted Extra attention is needed
Projects
Archived in project
Development

No branches or pull requests

3 participants