Skip to content

Commit 9c7d814

Browse files
authored
Scaffold out the macros chapter to section level (x.y) (#61)
1 parent 16e64a1 commit 9c7d814

File tree

1 file changed

+210
-0
lines changed

1 file changed

+210
-0
lines changed

src/coding-guidelines/macros.rst

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,213 @@
55

66
Macros
77
======
8+
9+
.. guideline:: Shall not use Declarative Macros
10+
:id: gui_h0uG1C9ZjryA
11+
:category: mandatory
12+
:status: draft
13+
:release: todo
14+
:fls: fls_xa7lp0zg1ol2
15+
:decidability: decidable
16+
:scope: system
17+
:tags: reduce-human-error
18+
19+
Description of the guideline goes here.
20+
21+
.. rationale::
22+
:id: rat_U3AEUPyaUhcb
23+
:status: draft
24+
25+
Explanation of why this guideline is important.
26+
27+
.. non_compliant_example::
28+
:id: non_compl_ex_Gb4zimei8cNI
29+
:status: draft
30+
31+
Explanation of code example.
32+
33+
.. code-block:: rust
34+
35+
fn example_function() {
36+
// Non-compliant implementation
37+
}
38+
39+
.. compliant_example::
40+
:id: compl_ex_Pw7YCh4Iv47Z
41+
:status: draft
42+
43+
Explanation of code example
44+
45+
.. code-block:: rust
46+
47+
fn example_function() {
48+
// Compliant implementation
49+
}
50+
51+
.. guideline:: Shall not use Procedural Macros
52+
:id: gui_m6BKTDzO2rdL
53+
:category: mandatory
54+
:status: draft
55+
:release: todo
56+
:fls: fls_wn1i6hzg2ff7
57+
:decidability: decidable
58+
:scope: system
59+
:tags: reduce-human-error
60+
61+
Description of the guideline goes here.
62+
63+
.. rationale::
64+
:id: rat_kAcNBmDhJ5W8
65+
:status: draft
66+
67+
Explanation of why this guideline is important.
68+
69+
.. non_compliant_example::
70+
:id: non_compl_ex_xhIwlJPZYbVb
71+
:status: draft
72+
73+
Explanation of code example.
74+
75+
.. code-block:: rust
76+
77+
fn example_function() {
78+
// Non-compliant implementation
79+
}
80+
81+
.. compliant_example::
82+
:id: compl_ex_JxmIfJ7plkEf
83+
:status: draft
84+
85+
Explanation of code example.
86+
87+
.. code-block:: rust
88+
89+
fn example_function() {
90+
// Compliant implementation
91+
}
92+
93+
.. guideline:: Shall not invoke macros
94+
:id: gui_a1mHfjgKk4Xr
95+
:category: mandatory
96+
:status: draft
97+
:release: todo
98+
:fls: fls_vnvt40pa48n8
99+
:decidability: decidable
100+
:scope: system
101+
:tags: reduce-human-error
102+
103+
Description of the guideline goes here.
104+
105+
.. rationale::
106+
:id: rat_62mSorNF05kD
107+
:status: draft
108+
109+
Explanation of why this guideline is important.
110+
111+
.. non_compliant_example::
112+
:id: non_compl_ex_hP5KLhqQfDcd
113+
:status: draft
114+
115+
Explanation of code example.
116+
117+
.. code-block:: rust
118+
119+
fn example_function() {
120+
// Non-compliant implementation
121+
}
122+
123+
.. compliant_example::
124+
:id: compl_ex_ti7GWHCOhUvT
125+
:status: draft
126+
127+
Explanation of code example.
128+
129+
.. code-block:: rust
130+
131+
fn example_function() {
132+
// Compliant implementation
133+
}
134+
135+
.. guideline:: Shall not write code that expands macros
136+
:id: gui_uuDOArzyO3Qw
137+
:category: mandatory
138+
:status: draft
139+
:release: todo
140+
:fls: fls_wjldgtio5o75
141+
:decidability: decidable
142+
:scope: system
143+
:tags: reduce-human-error
144+
145+
Description of the guideline goes here.
146+
147+
.. rationale::
148+
:id: rat_dNgSvC0SZ3JJ
149+
:status: draft
150+
151+
Explanation of why this guideline is important.
152+
153+
.. non_compliant_example::
154+
:id: non_compl_ex_g9j8shyGM2Rh
155+
:status: draft
156+
157+
Explanation of code example.
158+
159+
.. code-block:: rust
160+
161+
fn example_function() {
162+
// Non-compliant implementation
163+
}
164+
165+
.. compliant_example::
166+
:id: compl_ex_cFPg6y7upNdl
167+
:status: draft
168+
169+
Explanation of code example.
170+
171+
.. code-block:: rust
172+
173+
fn example_function() {
174+
// Compliant implementation
175+
}
176+
177+
.. guideline:: Shall ensure complete hygiene of macros
178+
:id: gui_8hs33nyp0ipX
179+
:category: mandatory
180+
:status: draft
181+
:release: todo
182+
:fls: fls_xlfo7di0gsqz
183+
:decidability: decidable
184+
:scope: system
185+
:tags: reduce-human-error
186+
187+
Description of the guideline goes here.
188+
189+
.. rationale::
190+
:id: rat_e9iS187skbHH
191+
:status: draft
192+
193+
Explanation of why this guideline is important.
194+
195+
.. non_compliant_example::
196+
:id: non_compl_ex_lRt4LBen6Lkc
197+
:status: draft
198+
199+
Explanation of code example.
200+
201+
.. code-block:: rust
202+
203+
fn example_function() {
204+
// Non-compliant implementation
205+
}
206+
207+
.. compliant_example::
208+
:id: compl_ex_GLP05s9c1g8N
209+
:status: draft
210+
211+
Explanation of code example.
212+
213+
.. code-block:: rust
214+
215+
fn example_function() {
216+
// Compliant implementation
217+
}

0 commit comments

Comments
 (0)