Skip to content

Latest commit

 

History

History
26 lines (15 loc) · 1.32 KB

code-standards.md

File metadata and controls

26 lines (15 loc) · 1.32 KB

Code Standards

The following page describes our expectations in terms of code quality and code standards.

While we do not currently aim to adhere completely to the Kubernetes coding conventions, we aspire to adhere as closely as possible.

Code Quality

  • Travis CI is configured to run gometalinter for static code checks with the following configuration. Any errors or warnings would cause a build failure.

  • All code must be formated with gofmt.

GoDoc and Comments

  • Any exported symbols (types, interfaces, funcs, structs, etc...) must have Godoc compatible comments associated with them.

  • Unexported symbols must be commented sufficiently to provide direction and context to a developer who didn't write the code

  • Inline code should be commented sufficiently to explain what complex code is doing. It's up to the developer and reviewers how much and what kind of documentation is necessary

Tests and Coverage

  • Unit and Integration Tests should be written for all changes.
  • Code Coverage of changes should be above 85%
  • It's the reviewers' responsibility to ensure that proper/ enough tests have been provided.