Skip to content

Commit 4b4e695

Browse files
authored
Add style guideline chapter (#27)
* Add style guideline chapter * use IETF RFC 2119 * add stub for Guideline Lifecycle (status) * add section for deprecated guidelines * add stubbed section for Compliance (deviation process) * add mechanism for which release the guideline is relevant for * add about release to style guideline * Eliminate deprecated, replace with retired * Allow for submission of coding guideline as advisory if unsure. * Relate together and show differences between category of disapplied and status of retired * Fix typo proscriptive => prescriptive * Add content for guideline to example
1 parent 481bd33 commit 4b4e695

31 files changed

+730
-5
lines changed

generate-guideline-templates.py

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def generate_guideline_template():
2727
:id: {guideline_id}
2828
:category:
2929
:status: draft
30+
:release:
3031
:fls:
3132
:decidability:
3233
:scope:

src/coding-guidelines/types-and-traits.rst

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Types and Traits
1010
:id: gui_xztNdXA2oFNB
1111
:category: required
1212
:status: draft
13+
:release: 1.85.0;1.85.1
1314
:fls: fls_cokwseo3nnr
1415
:decidability: decidable
1516
:scope: module

src/compliance/compliance-meaning.rst

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. SPDX-License-Identifier: MIT OR Apache-2.0
2+
SPDX-FileCopyrightText: The Coding Guidelines Subcommittee Contributors
3+
4+
.. default-domain:: coding-guidelines
5+
6+
Compliance Meaning
7+
==================

src/compliance/deviation-process.rst

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. SPDX-License-Identifier: MIT OR Apache-2.0
2+
SPDX-FileCopyrightText: The Coding Guidelines Subcommittee Contributors
3+
4+
.. default-domain:: coding-guidelines
5+
6+
Deviation Process
7+
=================

src/compliance/index.rst

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.. SPDX-License-Identifier: MIT OR Apache-2.0
2+
SPDX-FileCopyrightText: The Coding Guidelines Subcommittee Contributors
3+
4+
.. default-domain:: coding-guidelines
5+
6+
Compliance
7+
==========
8+
9+
.. toctree::
10+
:maxdepth: 1
11+
12+
compliance-meaning
13+
deviation-process

src/conf.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
extensions = [
2222
'sphinx.ext.autodoc',
2323
'sphinx.ext.viewcode',
24+
'sphinx.ext.autosectionlabel',
2425
'sphinx_needs',
2526
'coding_guidelines',
2627
]
@@ -88,9 +89,8 @@
8889

8990
needs_statuses = [
9091
dict(name="draft", description="This guideline is in draft stage", color="#999999"),
91-
dict(name="proposed", description="This guideline is proposed for review", color="#FFCC00"),
9292
dict(name="approved", description="This guideline has been approved", color="#00FF00"),
93-
dict(name="deprecated", description="This guideline is deprecated", color="#FF0000"),
93+
dict(name="retired", description="This guideline is retired", color="#FF0000"),
9494
]
9595

9696
needs_tags = [
@@ -119,8 +119,13 @@
119119
dict(name="system", description="This guideline must be checked alongside the entire source", color="#FFCC00"),
120120
]
121121

122+
needs_releases = [
123+
dict(name="1.85.0", description="This guideline can be checked at the module level", color="#999999"),
124+
dict(name="1.85.1", description="This guideline can be checked at the module level", color="#999999"),
125+
]
126+
122127
# Enable needs export
123-
needs_extra_options = ["category", "recommendation", "fls", "decidability", "scope"]
128+
needs_extra_options = ["category", "recommendation", "fls", "decidability", "scope", "release"]
124129

125130
# -- Options for HTML output -------------------------------------------------
126131

src/index.rst

+3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ Safety-Critical Rust Coding Guidelines
1313
README
1414
overview/index
1515
coding-guidelines/index
16+
compliance/index
17+
process/index
1618
appendices/index
19+
retired-guidelines/index
1720

1821
Indices and tables
1922
==================

src/overview/how-to-read.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
44
.. default-domain:: coding-guidelines
55

6-
How to read
6+
How to Read
77
===========
88

9-

src/process/guideline-lifecycle.rst

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. SPDX-License-Identifier: MIT OR Apache-2.0
2+
SPDX-FileCopyrightText: The Coding Guidelines Subcommittee Contributors
3+
4+
.. default-domain:: coding-guidelines
5+
6+
###################
7+
Guideline Lifecycle
8+
###################

src/process/index.rst

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.. SPDX-License-Identifier: MIT OR Apache-2.0
2+
SPDX-FileCopyrightText: The Coding Guidelines Subcommittee Contributors
3+
4+
.. default-domain:: coding-guidelines
5+
6+
Process
7+
=======
8+
9+
.. toctree::
10+
:maxdepth: 1
11+
12+
style-guideline
13+
guideline-lifecycle

0 commit comments

Comments
 (0)