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

Don't crash with empty vote and fix abstains being considered invalid #49

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

ermshiperete
Copy link
Owner

No description provided.

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 @ermshiperete - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Docstrings: 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.

@@ -241,15 +241,15 @@ public override HashSet<int> GetInvalidVotes(List<string> electedNominees)

for (var i = 0; i < lim; i++)
{
var electedNominee = electedNominees[i].Trim();
Copy link

Choose a reason for hiding this comment

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

issue (edge_case_not_handled): Consider the impact of null values in electedNominees list.

Using the null-conditional operator ?. on electedNominees[i] could lead to electedNominee being null, which is then not explicitly handled in the subsequent checks. Ensure that this case is intended and handled appropriately.

@ermshiperete ermshiperete merged commit a3ec2ab into master Apr 9, 2024
2 checks passed
@ermshiperete ermshiperete deleted the fix/bugs branch April 9, 2024 09:12
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.

1 participant