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) : non_constant_identifier_names #195

Closed
wants to merge 5 commits into from

Conversation

ItsAdityaKSingh
Copy link
Contributor

Refer #149

Fixed lints for the rule - non_constant_identifier_names

@coveralls
Copy link

coveralls commented Jan 17, 2022

Pull Request Test Coverage Report for Build 1928899728

  • 170 of 271 (62.73%) changed or added relevant lines in 44 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 70.707%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/ui/views/groups/add_assignment_view.dart 2 3 66.67%
lib/ui/views/groups/update_assignment_view.dart 2 3 66.67%
lib/utils/unicode_map.dart 0 1 0.0%
lib/services/ib_engine_service.dart 3 5 60.0%
lib/ui/views/groups/edit_group_view.dart 1 3 33.33%
lib/ui/views/groups/new_group_view.dart 1 3 33.33%
lib/ui/views/ib/builders/ib_subscript_builder.dart 0 2 0.0%
lib/ui/views/ib/builders/ib_superscript_builder.dart 0 2 0.0%
lib/ui/views/profile/edit_profile_view.dart 1 3 33.33%
lib/ui/views/groups/my_groups_view.dart 2 5 40.0%
Totals Coverage Status
Change from base Build 1926492772: -0.01%
Covered Lines: 3908
Relevant Lines: 5527

💛 - Coveralls

@@ -50,7 +50,7 @@ class _AboutViewState extends State<AboutView> {
}

Widget _buildContributorsList() {
switch (_model.stateFor(_model.FETCH_CONTRIBUTORS)) {
switch (_model.stateFor(_model.fetchCONTRIBUTORS)) {
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So you mean to say these changes be reverted back and the lint for non_constant_identifier_names be kept false?

Copy link
Member

Choose a reason for hiding this comment

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

Check if you can avoid renaming the variables while supporting the rule.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not quite sure what you meant here😅. Do I have to revert the changes? Or add ignore statements at a few places?

Copy link
Member

Choose a reason for hiding this comment

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

We want to keep using UPPER_CASE for the current variables we have and while supporting non_constant_identifier_names.

You need make UPPER_CASE variables as const and keep them in UPPER_CASE. In this way the rule will not be causing issue since we made it a constant.

@ItsAdityaKSingh
Copy link
Contributor Author

@manjotsidhu Please chalk out the required changes that you want here.

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.

You need to mark all the UPPER_CASE variables as const. In this way the rule will not be causing issue since we made it a constant.

@manjotsidhu manjotsidhu marked this pull request as draft April 25, 2022 14:27
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