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/UnusedLiteral marks unused nil literals as unused #560

Conversation

nobodywasishere
Copy link
Contributor

@nobodywasishere nobodywasishere commented Feb 3, 2025

Missed this for some reason

@nobodywasishere nobodywasishere marked this pull request as ready for review February 3, 2025 00:01
@nobodywasishere nobodywasishere force-pushed the nobody/unused-nil-literal branch from b3b4f39 to e5203b1 Compare February 3, 2025 00:06
@Sija Sija added this to the 1.7.0 milestone Feb 4, 2025
@nobodywasishere
Copy link
Contributor Author

nobodywasishere commented Feb 4, 2025

The unused nil in the failing specs is actually unused, but I'm not sure if there's a better way of writing that to work around it, besides expanding it to a full rescue block.

@Sija
Copy link
Member

Sija commented Feb 5, 2025

That's a customary way to write calls ignoring the errors with trailing rescue (there's no other way to do so otherwise), so I reckon these should be ignored.

@nobodywasishere
Copy link
Contributor Author

Closing this for now. Unused nils don't really have an impact (unlike unused arrays or other literals), so this isn't as big of a deal.

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.

2 participants