Merged
Conversation
* Check that candidates are not ranked identically * fix bug where write in candidates weren't checked for duplicate rankings * simplified range cause yeah * i think i actually fixed it this time * http response for consistency * removed extra period --------- Co-authored-by: Noah <bigspaceships56@gmail.com>
* Always stop at majority * End is always true if finalResult is calculated
this replaces the current hide functionality
Polls that are hidden really shouldn't be revealed
Also write tests
Contributor
Merged
* min number and cognitive complexity * variable name * revert match constant and import math
BigSpaceships
requested changes
Jan 13, 2026
main.go
Outdated
|
|
||
| maxNum := len(poll.Options) | ||
| voted := make([]bool, maxNum) | ||
| fmt.Println(poll.Options) |
Contributor
There was a problem hiding this comment.
This should probably be a logging call
Contributor
There was a problem hiding this comment.
I don't think this should still be in the code at all tbh
|
|
||
| ## To-Dos | ||
|
|
||
| - [ ] Don't let the user fuck it up |
Contributor
There was a problem hiding this comment.
seems like we're making progress on this one :)
Contributor
|
just as a note, I'm setting |
* remove debug log call and added dev flags log messages * update readme with some todos * Create pull request template * Add Dependabot configuration for Go modules * oops forgot target-branch
BigSpaceships
approved these changes
Jan 20, 2026
Contributor
BigSpaceships
left a comment
There was a problem hiding this comment.
LGTM sorry I thought I approved this
shaeespring
added a commit
that referenced
this pull request
Jan 23, 2026
This reverts commit 5e6f38d.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Adds CI and initial setup for tests #53
Allow hiding results while poll is open #52
Adds SonarQube #54
Hides Poll URL if vote is hidden #51
Stops Ranking if the majority is hit #50
Check if candidates are identical #47
Fixed crashing bug #46
Testing
Voted for filling in all candidates and a write-in 👍 Doesn't crash
After a poll is hidden, it should not be revealable 👍 Reveal button is removed
Creating a vote with the "hide results until poll closes" button 👍 Works
Ending a vote with above's parameters 👍 After the vote is ended, people can see results
write ins on non-custom votes 👍 works and cannot be duplicated (rank or choice)
custom votes accept write-ins 👍
custom votes handle the duplicated rank/choice 👍
Ranking 1 and 3 (but not 2) works. It does this not as a write in too 👍 (@BigSpaceships)
Tests pass running
go testin the database folder 👍Testing not Done
Anything with the bot
Does sonarqube work
Can alumni do testing stuff with their local environment if that environment variable is set? (@mxmeinhold could, so the answer is likely yes)
Notes:
There's a couple of maintainability issues flagged by sonarqube from this PR.
https://sonarqube.csh.rit.edu/project/issues?createdInLast=1w&issueStatuses=CONFIRMED%2COPEN&id=ComputerScienceHouse_vote_c5ba863d-30d7-4fa9-97dd-4f2c58f8f5fa