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
Documented design patterns and code conventions #2305
Documented design patterns and code conventions #2305
Conversation
Signed-off-by: Marco Pracucci <marco@pracucci.com>
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
Do we want to adopt Prometheus' style guide as well? https://github.com/prometheus/prometheus/blob/master/CONTRIBUTING.md#contributing Mainly: Relevant coding style guidelines are the Go Code Review Comments and the _Formatting and style_section of Peter Bourgon's Go: Best Practices for Production Environments. I have this muscle memory about "comments starting with capitals and ending with period" and other things I've built up since my Prometheus work that I've been suppressing :) |
Thanos has a lint check that verifies this! :) |
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Makes much sense to me. I've added it. @gouthamve What's about now? |
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
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
What this PR does:
While working on #2204 and #1512 I've realised it's difficult to succeed in the metrics refactoring it it's not a team effort and if we continue to accept PRs breaking the design we're heading to.
For this reason, I would like to propose some basic design patterns and code conventions doc (nothing new to frequent contributors) which we can link to while doing code reviews whenever we see these conventions violated.
What's your take?
Notes:
CONTRIBUTING.md
underdocs/
Which issue(s) this PR fixes:
N/A
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]