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

Avoid warning: assigned but unused variable - comments #316

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

olleolleolle
Copy link
Contributor

@olleolleolle olleolleolle commented Jul 22, 2024

What does this PR do?

It avoids a Ruby warning.

Why are we doing this? Any context or related work?

For clearer output.

Where should a reviewer start?

I had a warning like this when using this gem:

/gems/gems/ruby-trello-4.2.0/lib/trello/card.rb:306: warning: assigned but unused variable - comments

Manual testing steps?

None.

Summary by Sourcery

This pull request addresses a Ruby warning by removing an unused variable assignment in the comments method of the Trello card class.

  • Bug Fixes:
    • Removed an unused variable assignment to avoid a Ruby warning in the comments method.

Copy link

sourcery-ai bot commented Jul 22, 2024

Reviewer's Guide by Sourcery

This pull request addresses a Ruby warning by removing an unused variable assignment in the comments method of the lib/trello/card.rb file. The change ensures cleaner output by eliminating the warning message.


Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @olleolleolle - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider adding a brief comment explaining why the result isn't being assigned to a variable, to prevent future developers from reintroducing the same issue.
  • It might be beneficial to run a linter or static analysis tool across the entire codebase to catch and fix similar unused variable warnings, if not already done.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@runlevel5 runlevel5 merged commit ddea4c7 into jeremytregunna:master Jul 22, 2024
32 checks passed
@olleolleolle olleolleolle deleted the patch-3 branch July 22, 2024 21:14
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.

2 participants