File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,26 @@ to the issue/PR, which helps to preserve the context.
72
72
73
73
* Always open an issue for a TODO or a follow-up just in case you forget it.
74
74
75
+ ### Technical and style guidelines
76
+
77
+ The following guidelines apply primarily to kube-scheduler, but some subprojects
78
+ might also adhere to them.
79
+
80
+ - Follow [ effective go] ( https://go.dev/doc/effective_go ) guidelines.
81
+ - Naming:
82
+ - Length: As a rule-of-thumb, the length of a variable name should be
83
+ proportional to the size of the scope where it is used and inversely
84
+ proportional to the number of times that it is used.
85
+ - In tests:
86
+ - Follow a [ DAMP principle] ( https://stackoverflow.com/a/11837973 ) .
87
+ - Use ` cmp.Diff ` instead of ` reflect.Equal ` , to provide useful comparisons.
88
+ - Avoid creating or using assertion libraries.
89
+ Use standard ` t.Error ` or ` t.Fatal ` , as necessary.
90
+
91
+ Note that some existing code might be in violation of these guidelines, as it
92
+ might have been written before these guidelines were established. Feel free to
93
+ open PRs to get the code up to the standard.
94
+
75
95
## Use of @mentions
76
96
77
97
* @kubernetes/sig-scheduling-api-reviews - API Changes and Reviews
You can’t perform that action at this time.
0 commit comments