Open
Description
What would you like to be added:
As the functionality and number of packages in krel
continues to grow, we are starting to see divergence in how new features are implemented, tested, and maintained. We should add style guidelines and quality standards so that someone is completely new to the project can make contributions that are easily reviewed and integrated without degrading quality.
Why is this needed:
There are a few key areas that we have determined as important to maintain quality and consistency:
- Exposing the minimum required public API in packages (i.e. bias towards private fields in structs and interfaces)
- Follow pattern of "accepting interfaces, returning structs" (i.e Robustness principle)
- Avoid "testing through" (i.e. make your interfaces easily mockable)
- Generate mocks in a consistent manner (we use counterfeiter)
- Establish and measure a (potentially flexible) threshold for unit test coverage
- Establish what types of features require integration / e2e testing
This is not an all-inclusive list, but can serve as a good starting point for a document that we can continually iterate on.
/assign @hasheddan @saschagrunert
Metadata
Assignees
Labels
Issues or PRs related to the Release Engineering subprojectCategorizes issue or PR as related to design.Categorizes issue or PR as related to documentation.Categorizes issue or PR as related to a new feature.Indicates that an issue or PR should not be auto-closed due to staleness.Must be staffed and worked on either currently, or very soon, ideally in time for the next release.Categorizes an issue or PR as relevant to SIG Release.