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

Rule: pointless-reassignment #878

Merged
merged 1 commit into from
Jul 1, 2024
Merged

Rule: pointless-reassignment #878

merged 1 commit into from
Jul 1, 2024

Conversation

anderseknert
Copy link
Member

Also:

  • fix the one violation of this rule found in our code :P
  • add metadata annotations to a bunch of rules

Fixes #867

}
```

This rule does not consider that a violation.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
This rule does not consider that a violation.
This rule does not consider such examples violations.

Copy link
Member

Choose a reason for hiding this comment

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

I wonder what if I a had a rule like foo_bar_whizzz_bang_bar_foo_baz_v1_foo, and then reassigned it for readability, would this be good to ignore too?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd say the issue then would be you naming a rule or var like that in the first place :D

some m1 in sorted_group
some m2 in sorted_group
some loc in package_locations[m1][m2]
e := loc
Copy link
Member

Choose a reason for hiding this comment

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

my handiwork!

Also:
- fix the one violation of this rule found in our code :P
- add metadata annotations to a bunch of rules

Fixes #867

Signed-off-by: Anders Eknert <anders@styra.com>
@anderseknert anderseknert force-pushed the pointless-reassignment branch from 7a2d95b to 07e4ad7 Compare July 1, 2024 08:51
@anderseknert anderseknert merged commit ce8b8ff into main Jul 1, 2024
3 checks passed
@anderseknert anderseknert deleted the pointless-reassignment branch July 1, 2024 08:53
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
Also:
- fix the one violation of this rule found in our code :P
- add metadata annotations to a bunch of rules

Fixes StyraInc#867

Signed-off-by: Anders Eknert <anders@styra.com>
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.

Rule: pointless-reassignment
2 participants