Skip to content

Commit 21a423a

Browse files
authored
docs: Add code style guide (#518)
* Add code style guide * Add mention of well-known acronyms * Add naming convention for optional variables * Apply doc style guide * Add resource quantity rules * Clarify identifier names, add more examples * Add admonition, change world to universe * Add why we avoid unabbreviated identifier names * Adjust newline rule * Add struct and enum naming rule * Move some rules * Add missing admonitions, group rules * Adjust error message rule for more clarity * Clarify string formatting rules * Clarify resource rules * Explain some points why we use snafu * Inline K8s link * Adjust CPU resource rule * Reorder memory resource rule * Mention that function names can contain indicators to indicate optional values * Add explanation to named vs unnamed fmt string identifiers * Add note about long format strings * Add one more valid example for named format string identifier * Update UI * Add UI fix * Add quote, add example for single-letter identifier * Add enum / struct item separation notes * Add a few rules of thumb for error messages
1 parent e803ced commit 21a423a

File tree

5 files changed

+500
-5
lines changed

5 files changed

+500
-5
lines changed

modules/contributor/nav.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
** xref:steps.adoc[]
44
** xref:testing_on_kubernetes.adoc[]
55
** xref:development_dashboard.adoc[]
6-
** xref:style_guide.adoc[]
6+
** xref:code-style-guide.adoc[]
7+
** xref:docs-style-guide.adoc[]
78
** Implementation guidelines
89
*** xref:logging.adoc[]
910
*** xref:service_discovery.adoc[]

0 commit comments

Comments
 (0)