-
Notifications
You must be signed in to change notification settings - Fork 8
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
Further work on message validation #1758
Merged
Merged
Changes from 16 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
9df081e
Added isValidWriteIn in MessageValidator.kt
Kaz-ookid 01ea364
EncryptedVote validations
Kaz-ookid 5c476b7
EncryptedVote validations : Previous tests now using valid formats
Kaz-ookid 67d5d15
EncryptedVote : added tests for validations
Kaz-ookid ed2baf8
EncryptedVote : added tests for validations + More previous tests usi…
Kaz-ookid f5d56d6
ElectionQuestion : added validQuestions in MessageValidator + added v…
Kaz-ookid 151cf30
fixed format
Kaz-ookid 07d495b
ElectionQuestion : added validation at Question creation + added tests
Kaz-ookid e83a468
ElectionQuestion : removed overlapping Question validations
Kaz-ookid 65a7caf
ElectionQuestion : fixed wrong hashCode concatenation
Kaz-ookid f88cfaa
MessageValidator : removed unnecessary function isValidWriteIn
Kaz-ookid fed6cb7
MessageValidator : moved validVotingMethods as a static field
Kaz-ookid 7bbf22c
MessageValidator : forEach instead of useless map use
Kaz-ookid 9768d91
CastVoteTest : actually using defined vote variables to avoid hardcod…
Kaz-ookid fed176f
formatting
Kaz-ookid a819878
formatting : run ktfmtFormat
Kaz-ookid eb92351
ElectionQuestion : Addressing Matteo's comments
Kaz-ookid 2aed118
MessageValidator : Addressing Matteo's comments
Kaz-ookid a7c0acb
CastVoteTest : actually using defined vote variables to avoid hardcod…
Kaz-ookid b41f82f
formatting : run ktfmtFormat
Kaz-ookid a7e5a5f
Merge remote-tracking branch 'origin/work-fe2-maxime-message-validati…
Kaz-ookid e2d820d
ElectionQuestion : removed useless validation function (validQuestions)
Kaz-ookid ef01bc7
Merge branch 'master' into work-fe2-maxime-message-validation
Kaz-ookid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Saw that you did a commit named
ElectionQuestion : removed overlapping Question validations
but it's actually an empty commit (just some formatting), so I guess you forgot to remove the validQuestions check hereThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually removed the redundant checks performed in
validQuestions
, line 245 ofMessageValidator
(callingvalidQuestion
for each Question in the list). validQuestions is still used, as it checks for duplicates and requires the list not to be empty. Maybe it makes it not relevant anymore to be a function inMessageValidator
tho.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the point was: why are you still calling
.validQuestions(listOf(question))
inElectionQuestion
? The fact that the list is not empty and without duplicates is given by the construction of it (a list of 1 element)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yes that makes a lot of sense, I overlooked