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

fix(lints): always_declare_return_types and prefer_if_elements_to_con… #153

Merged
merged 3 commits into from
Oct 8, 2021

Conversation

Neha62-lit
Copy link
Contributor

@Neha62-lit Neha62-lit commented Oct 8, 2021

Refer #149

Fix lints for these rules:

  • prefer_if_elements_to_conditional_expressions
  • always_declare_return_types(As of now there is no warning in the code)

Also here if I remove the "prefer_if_elements_to_conditional_expressions" rule then after flutter analyzing I am not getting warnings/errors that's why I am keeping that rule as it is.

@manjotsidhu
Copy link
Member

manjotsidhu commented Oct 8, 2021

Please don't use Fixes #149 since it closes the Issue instead refer it using Refer #149

@manjotsidhu
Copy link
Member

manjotsidhu commented Oct 8, 2021

Also here if I remove the "prefer_if_elements_to_conditional_expressions" rule then after flutter analyzing I am not getting warnings/errors that's why I am keeping that rule as it is.

Doesn't make sense, try removing it. It will make no difference.

@Neha62-lit
Copy link
Contributor Author

Also here if I remove the "prefer_if_elements_to_conditional_expressions" rule then after flutter analyzing I am not getting warnings/errors that's why I am keeping that rule as it is.

Doesn't make sense, try removing it. It will make no difference.

Okay, Should I remove both the rules from analysis_options file?

@manjotsidhu
Copy link
Member

Also here if I remove the "prefer_if_elements_to_conditional_expressions" rule then after flutter analyzing I am not getting warnings/errors that's why I am keeping that rule as it is.

Doesn't make sense, try removing it. It will make no difference.

Okay, Should I remove both the rules from analysis_options file?

Yes just like you did in previous PR

@Neha62-lit
Copy link
Contributor Author

Neha62-lit commented Oct 8, 2021

Also here if I remove the "prefer_if_elements_to_conditional_expressions" rule then after flutter analyzing I am not getting warnings/errors that's why I am keeping that rule as it is.

Doesn't make sense, try removing it. It will make no difference.

Okay, Should I remove both the rules from analysis_options file?

Yes just like you did in previous PR

Okay and also remove the changes in all the dart files that I changed for that rule, right? or only remove rules from that file.

@manjotsidhu
Copy link
Member

Well you have asked the same question thrice in this PR and thrice in the previous PR. I just said to remove the rules from analyzer_options.yml that we are fixing because -

some_rule: false means to disable to the rule, some_rule: true means to enable the rule. Also if we don't mention the rule, by default the value is true.

Copy link
Member

@manjotsidhu manjotsidhu left a comment

Choose a reason for hiding this comment

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

Format the code using: flutter format .

@coveralls
Copy link

coveralls commented Oct 8, 2021

Pull Request Test Coverage Report for Build 1319397737

  • 40 of 79 (50.63%) changed or added relevant lines in 11 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 74.17%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/ui/components/cv_header.dart 11 12 91.67%
lib/ui/views/groups/add_assignment_view.dart 2 3 66.67%
lib/ui/views/groups/components/member_card.dart 4 5 80.0%
lib/ui/views/groups/update_assignment_view.dart 2 3 66.67%
lib/ui/views/ib/ib_page_view.dart 4 5 80.0%
lib/ui/components/cv_typeahead_field.dart 0 2 0.0%
lib/ui/views/ib/ib_landing_view.dart 2 4 50.0%
lib/ui/views/ib/components/ib_pop_quiz_button.dart 0 10 0.0%
lib/ui/views/cv_landing_view.dart 4 24 16.67%
Totals Coverage Status
Change from base Build 1319128705: -0.02%
Covered Lines: 4023
Relevant Lines: 5424

💛 - Coveralls

Copy link
Member

@manjotsidhu manjotsidhu left a comment

Choose a reason for hiding this comment

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

Good work 👍

@manjotsidhu manjotsidhu merged commit c354531 into CircuitVerse:master Oct 8, 2021
@Neha62-lit Neha62-lit deleted the fix-lints-3 branch October 8, 2021 08:29
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.

3 participants