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

Lint: Remove useless assignments #12648

Merged

Conversation

Sija
Copy link
Contributor

@Sija Sija commented Oct 23, 2022

This PR removes useless assignments found throughout the codebase.

From what I've (or rather ameba) found, they fall into 2 categories:

  1. human errors - like forgetting to use the declared variable
  2. leftovers or others

I've separated the commits based on the above, to ease the review process.

@Sija Sija force-pushed the fix-ameba-lint-useless-assign-issues branch from 2002461 to f57c0f9 Compare October 23, 2022 20:23
Copy link
Member

@beta-ziliani beta-ziliani left a comment

Choose a reason for hiding this comment

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

Nothing worth addressing really. Let's ship it! Thanks Sija!

samples/wordcount.cr Show resolved Hide resolved
@@ -730,7 +730,7 @@ class Crystal::Call
end

def def_full_name(owner, a_def, arg_types = nil)
Call.def_full_name(owner, a_def, arg_types = nil)
Call.def_full_name(owner, a_def, arg_types)
Copy link
Member

Choose a reason for hiding this comment

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

This was a bug 😮

@beta-ziliani beta-ziliani added this to the 1.7.0 milestone Oct 28, 2022
@straight-shoota straight-shoota merged commit 9ae8024 into crystal-lang:master Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants