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

chore: enable unparam linter #7174

Merged
merged 3 commits into from May 3, 2024
Merged

chore: enable unparam linter #7174

merged 3 commits into from May 3, 2024

Conversation

jedevc
Copy link
Member

@jedevc jedevc commented Apr 24, 2024

Partially inspired by moby/buildkit#4828 upstream.

Unused parameters can sometimes indicate weird issues, at the very least that are a bit of a code smell (additionally, gopls in vscode loves to flag these, which is the main reason I wanted to clear them up lol).

Thankfully, none of these are significant, there are no hiding bugs, it's just a little bit of a tidy up.

unparam definitely seems to be optimized for less "noise", and doesn't pick up on every unused parameter - it seems to try and avoid finding cases where this is used in an interface/higher-order function.

@jedevc jedevc requested a review from vito April 24, 2024 11:22
Copy link
Member Author

Choose a reason for hiding this comment

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

While I was in the area, I also fixed up some of the incorrect doc comments here 🎉

jedevc added 3 commits May 3, 2024 10:24
And also enable a linter to catch these in the future. `unparam` seems
to be optimized more heavily to avoid false positives, and is
significantly better at not bringing up weird interface cases that
revive seems to love.

Signed-off-by: Justin Chadwell <[email protected]>
Signed-off-by: Justin Chadwell <[email protected]>
@jedevc jedevc merged commit 2f29d13 into dagger:main May 3, 2024
44 checks passed
vikram-dagger pushed a commit to vikram-dagger/dagger that referenced this pull request May 3, 2024
* chore: fix some doc comments for daqgl to match

Signed-off-by: Justin Chadwell <[email protected]>

* chore: remove some unused parameters

And also enable a linter to catch these in the future. `unparam` seems
to be optimized more heavily to avoid false positives, and is
significantly better at not bringing up weird interface cases that
revive seems to love.

Signed-off-by: Justin Chadwell <[email protected]>

* fixups

Signed-off-by: Justin Chadwell <[email protected]>

---------

Signed-off-by: Justin Chadwell <[email protected]>
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.

None yet

2 participants