Skip to content

Commit 202ca82

Browse files
ivorcandyblundell
andauthored
Add rules for code repositories (#107)
Co-authored-by: andyblundell <[email protected]>
1 parent b088b49 commit 202ca82

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

patterns/everything-as-code.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Everything (including [infrastructure](../practices/cloud-services.md)) should b
1919
* All code is treated the same (e.g. application code, infrastructure code, test code, etc).
2020
* All code is [peer-reviewed](#code-review) and tested.
2121
* All code is version controlled.
22+
* The mainline branch (e.g. `master`) is protected: no force-pushes are allowed and code reviews, tests and any other automated checks must pass before pull/merge requests can be merged. Administrators should be subject to the same rules.
23+
* In general, squash merges are preferred for cleaner history. This does rely on merges being small, as should be the practice in any case.
2224
* Code changes should be automatically checked for code quality using tools like [SonarQube](https://www.sonarqube.org) (as well as via IDE plugins).
2325
* Code should be automatically scanned for secrets or other sensitive data (see [security](../practices/security.md) for details)
2426
* Prefer well structured and expressive code over extensive documentation to avoid documentation getting out of date.

0 commit comments

Comments
 (0)