-
Notifications
You must be signed in to change notification settings - Fork 7
Maintainability #58
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
Maintainability #58
Conversation
costowell
left a comment
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.
Overall looks good. Still not totally sold on the MATCH thing, but totally open to feedback.
database/poll.go
Outdated
|
|
||
| const POLL_TYPE_SIMPLE = "simple" | ||
| const POLL_TYPE_RANKED = "ranked" | ||
| const MATCH = "$match" |
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.
I can see where you're (SonarQube is?) going with this, but I'm not so sure this improves maintainability. I think it'd be better to keep this in the query because that's how mongo queries look like i.e.
{ $match: { salary: 9000 } }
I would like more input though, I could be totally crazy.
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.
I can mark it in SonarQube as a false positive because of the query reasoning
BigSpaceships
left a comment
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.
LGTM!
costowell
left a comment
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.
LGTM
Fixes 3/5 maintainability issues outlined in dev's PR to main #56
Notes
Doesn't touch the TODO comments (the other 2 SonarQube issues).
Labeled $match issue (sonarqube wanted this to be a constant) as a false positive