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: argument-always-wildcard #872

Closed
anderseknert opened this issue Jun 27, 2024 · 0 comments · Fixed by #883
Closed

Rule: argument-always-wildcard #872

anderseknert opened this issue Jun 27, 2024 · 0 comments · Fixed by #883

Comments

@anderseknert
Copy link
Member

Encountered in the wild, but most likely quite uncommon. If all definitions of a function have a wildcard argument at the same position, that argument should just be removed.

fun(x, _) if {
    # ...
}

fun(x, _) if {
    # ...
}

I think this is most likely to happen in refactoring, where you might remove the one definition where it's actually used.

@anderseknert anderseknert changed the title Rule: redundant-wildcard-argument Rule: argument-always-wildcard Jun 28, 2024
anderseknert added a commit that referenced this issue Jul 2, 2024
I did not expect that I'd have to fix any issues in Regal as a result of
this, but that was a rather nice surprise!

Fixes #872

Signed-off-by: Anders Eknert <[email protected]>
anderseknert added a commit that referenced this issue Jul 2, 2024
I did not expect that I'd have to fix any issues in Regal as a result of
this, but that was a rather nice surprise!

Fixes #872

Signed-off-by: Anders Eknert <[email protected]>
charlieegan3 pushed a commit that referenced this issue Jul 2, 2024
I did not expect that I'd have to fix any issues in Regal as a result of
this, but that was a rather nice surprise!

Fixes #872

Signed-off-by: Anders Eknert <[email protected]>
anderseknert added a commit that referenced this issue Jul 2, 2024
I did not expect that I'd have to fix any issues in Regal as a result of
this, but that was a rather nice surprise!

Fixes #872

Signed-off-by: Anders Eknert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant