Skip to content

Commit f0a4b77

Browse files
committed
deploy: 4543086
1 parent 9f15a8e commit f0a4b77

8 files changed

Lines changed: 676 additions & 227 deletions

File tree

_sources/coding-guidelines/expressions.rst.txt

Lines changed: 236 additions & 60 deletions
Large diffs are not rendered by default.

coding-guidelines/associated-items.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116

117117
<section id="associated-items">
118118
<h1>Associated Items<a class="headerlink" href="#associated-items" title="Link to this heading"></a></h1>
119-
<div class="need_container docutils container" id="SNCB-7347d38f">
119+
<div class="need_container docutils container" id="SNCB-fc3b60a2">
120120
<table class="need needs_grid_simple needs_layout_clean needs_style_none needs_type_guideline docutils align-default" id="gui_ot2Zt3dd6of1">
121121
<tbody>
122122
<tr class="need head row-odd"><td class="need head"><div class="needs_head line-block">
@@ -139,7 +139,7 @@ <h1>Associated Items<a class="headerlink" href="#associated-items" title="Link t
139139
</td>
140140
</tr>
141141
<tr class="need content row-odd"><td class="need content" colspan="1"><p>Any function shall not call itself directly or indirectly</p>
142-
<div class="need_container docutils container" id="SNCB-5499a81b">
142+
<div class="need_container docutils container" id="SNCB-c64207e4">
143143
<table class="need needs_grid_simple needs_layout_clean needs_style_none needs_type_rationale docutils align-default" id="rat_gvoKeVSKK8fD">
144144
<tbody>
145145
<tr class="need head row-odd"><td class="need head"><div class="needs_head line-block">
@@ -160,7 +160,7 @@ <h1>Associated Items<a class="headerlink" href="#associated-items" title="Link t
160160
</tbody>
161161
</table>
162162
</div>
163-
<div class="need_container docutils container" id="SNCB-78643da2">
163+
<div class="need_container docutils container" id="SNCB-13b94b5b">
164164
<table class="need needs_grid_simple needs_layout_clean needs_style_none needs_type_non_compliant_example docutils align-default" id="non_compl_ex_MxqhjfkStJJy">
165165
<tbody>
166166
<tr class="need head row-odd"><td class="need head"><div class="needs_head line-block">
@@ -201,7 +201,7 @@ <h1>Associated Items<a class="headerlink" href="#associated-items" title="Link t
201201
</tbody>
202202
</table>
203203
</div>
204-
<div class="need_container docutils container" id="SNCB-5e11be18">
204+
<div class="need_container docutils container" id="SNCB-3c5cbd65">
205205
<table class="need needs_grid_simple needs_layout_clean needs_style_none needs_type_compliant_example docutils align-default" id="compl_ex_9pK3h65rfceO">
206206
<tbody>
207207
<tr class="need head row-odd"><td class="need head"><div class="needs_head line-block">

coding-guidelines/expressions.html

Lines changed: 336 additions & 84 deletions
Large diffs are not rendered by default.

coding-guidelines/macros.html

Lines changed: 40 additions & 40 deletions
Large diffs are not rendered by default.

coding-guidelines/types-and-traits.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116

117117
<section id="types-and-traits">
118118
<h1>Types and Traits<a class="headerlink" href="#types-and-traits" title="Link to this heading"></a></h1>
119-
<div class="need_container docutils container" id="SNCB-800d6617">
119+
<div class="need_container docutils container" id="SNCB-213b1b86">
120120
<table class="need needs_grid_simple needs_layout_clean needs_style_none needs_type_guideline docutils align-default" id="gui_xztNdXA2oFNB">
121121
<tbody>
122122
<tr class="need head row-odd"><td class="need head"><div class="needs_head line-block">
@@ -141,7 +141,7 @@ <h1>Types and Traits<a class="headerlink" href="#types-and-traits" title="Link t
141141
<tr class="need content row-odd"><td class="need content" colspan="1"><p>Code must not rely on Rust’s implicit integer wrapping behavior that may occur in release
142142
builds. Instead, explicitly handle potential overflows using the standard library’s checked,
143143
saturating, or wrapping operations.</p>
144-
<div class="need_container docutils container" id="SNCB-cf965766">
144+
<div class="need_container docutils container" id="SNCB-f6e681ca">
145145
<table class="need needs_grid_simple needs_layout_clean needs_style_none needs_type_rationale docutils align-default" id="rat_kYiIiW8R2qD1">
146146
<tbody>
147147
<tr class="need head row-odd"><td class="need head"><div class="needs_head line-block">
@@ -174,7 +174,7 @@ <h1>Types and Traits<a class="headerlink" href="#types-and-traits" title="Link t
174174
</tbody>
175175
</table>
176176
</div>
177-
<div class="need_container docutils container" id="SNCB-89b18ad9">
177+
<div class="need_container docutils container" id="SNCB-00c8ac91">
178178
<table class="need needs_grid_simple needs_layout_clean needs_style_none needs_type_non_compliant_example docutils align-default" id="non_compl_ex_PO5TyFsRTlWv">
179179
<tbody>
180180
<tr class="need head row-odd"><td class="need head"><div class="needs_head line-block">
@@ -203,7 +203,7 @@ <h1>Types and Traits<a class="headerlink" href="#types-and-traits" title="Link t
203203
</tbody>
204204
</table>
205205
</div>
206-
<div class="need_container docutils container" id="SNCB-8504e79b">
206+
<div class="need_container docutils container" id="SNCB-11aea64c">
207207
<table class="need needs_grid_simple needs_layout_clean needs_style_none needs_type_compliant_example docutils align-default" id="compl_ex_WTe7GoPu5Ez0">
208208
<tbody>
209209
<tr class="need head row-odd"><td class="need head"><div class="needs_head line-block">

guidelines-ids.json

Lines changed: 54 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -278,147 +278,168 @@
278278
"id": "gui_HDnAZ7EZ4z6G",
279279
"title": "Avoid as underscore pointer casts",
280280
"link": "coding-guidelines/expressions.html#gui_HDnAZ7EZ4z6G",
281-
"checksum": "aed5bc5095eaa9b6d2d27ae3c9da17db652f6296b9ebb8d5cc8f82f51ebffc65",
281+
"checksum": "09fc89373128f31a0ff1af3e2e4b283cae9fe07cda811217b577f84501c95c63",
282282
"rationale": {
283283
"id": "rat_h8LdJQ1MNKu9",
284284
"link": "coding-guidelines/expressions.html#rat_h8LdJQ1MNKu9",
285-
"checksum": "77f55e10c36f0e448cf52020da234bc8af6554c6f88685f861d764274733cd1a"
285+
"checksum": "3e75b62845841f9fa8567c80682df8dd6a89da632489462e816fb812c84ebf8e"
286286
},
287287
"non_compliant_example": {
288288
"id": "non_compl_ex_V37Pl103aUW4",
289289
"link": "coding-guidelines/expressions.html#non_compl_ex_V37Pl103aUW4",
290-
"checksum": "6e8a5010bcf3a491b69cffd63e889ae62ed5d8ded9170ee523d53f6ec38e72c9"
290+
"checksum": "15d5b0ed0d98e63e0227a2f1761e090e1144d6b86fbe2f7c23ea6e9ff7c2316c"
291291
},
292292
"compliant_example": {
293293
"id": "compl_ex_W08ckDrkOhkt",
294294
"link": "coding-guidelines/expressions.html#compl_ex_W08ckDrkOhkt",
295-
"checksum": "b35f60a6af5bc523e10800d002b52ec4236094a5e6b8439a36581cef7ea74598"
295+
"checksum": "fd494c967cb13b54f3d8c9b5e7bf82f1eca5ab3748063d3a18bfe497e27553cf"
296296
}
297297
},
298298
{
299299
"id": "gui_7y0GAMmtMhch",
300-
"title": "Do not use integer type as divisor",
300+
"title": "Do not use an integer type as a divisor during integer division",
301301
"link": "coding-guidelines/expressions.html#gui_7y0GAMmtMhch",
302-
"checksum": "fae52e1e22838535ff46291210445df0ff9203ff77f3c05b4e64d3ed3e26211b",
302+
"checksum": "15b90f3808b1e9ae4d3f6e605a7045b42ab3c0a384bb6ae535b0de177216b60f",
303303
"rationale": {
304304
"id": "rat_vLFlPWSCHRje",
305305
"link": "coding-guidelines/expressions.html#rat_vLFlPWSCHRje",
306-
"checksum": "438abfa732fdcc0b99583b488394278c0bf3b177cd38a589994953e5ec16b5fb"
306+
"checksum": "e238f8477530a5c0440660dba38062589c1ea01c72d3ac357271aad326c66adc"
307307
},
308308
"non_compliant_example": {
309309
"id": "non_compl_ex_0XeioBrgfh5z",
310310
"link": "coding-guidelines/expressions.html#non_compl_ex_0XeioBrgfh5z",
311-
"checksum": "b2d69147923170d1270984da5e13a1c71b706be0b938f6b2634f246bebdf950e"
311+
"checksum": "6085fc1cb72ad6f28cd51ceedf724a4f54e5bdb3526b6acb608cde44df880827"
312312
},
313313
"compliant_example": {
314-
"id": "compl_ex_k1CD6xoZxhXb",
315-
"link": "coding-guidelines/expressions.html#compl_ex_k1CD6xoZxhXb",
316-
"checksum": "9f94a1c4c5cfd55b032d1b2e9edddfdc5a74b0e969d5deb94f6e4088f85b4fd5"
314+
"id": "compl_ex_k1CD6xoZxhXc",
315+
"link": "coding-guidelines/expressions.html#compl_ex_k1CD6xoZxhXc",
316+
"checksum": "b13cc921b50ccb16dd7def6fe3241a5e29ea2fd70e388fe49727105ee565fbdc"
317317
}
318318
},
319319
{
320320
"id": "gui_kMbiWbn8Z6g5",
321321
"title": "Do not divide by 0",
322322
"link": "coding-guidelines/expressions.html#gui_kMbiWbn8Z6g5",
323-
"checksum": "a722a7e85b0177ecb59f8c787b8d81e8d9320cead276d85df147bc7f4c470365",
323+
"checksum": "a6451b8634f7c5b7b315ff337877a3e7f5fe5dcb1bff3badc4cb47b881b01c55",
324324
"rationale": {
325325
"id": "rat_h84NjY2tLSBW",
326326
"link": "coding-guidelines/expressions.html#rat_h84NjY2tLSBW",
327-
"checksum": "1adff305c335954b6cdde966580dac6e17863ae823a221b9e43e452ccf147a81"
327+
"checksum": "4afa831c371508742e54624fa6ad51d6818d6b4fef6b90d72e721db6cee32684"
328328
},
329329
"non_compliant_example": {
330330
"id": "non_compl_ex_LLs3vY8aGz0F",
331331
"link": "coding-guidelines/expressions.html#non_compl_ex_LLs3vY8aGz0F",
332-
"checksum": "63bc6b2be3d41eb462859a7e0bb670624fd07b2d71659caec9f4fb7e8365cdb9"
332+
"checksum": "b28f03cd1317fc4c6d24d3ecb6d37e5e5fdbe909abe1c87e538fe49c842be1b7"
333333
},
334334
"compliant_example": {
335-
"id": "compl_ex_Ri9pP5Ch3kbb",
336-
"link": "coding-guidelines/expressions.html#compl_ex_Ri9pP5Ch3kbb",
337-
"checksum": "9722faf41ec050baaa17f96b2ca759088974dad561f1f639463c4bbc7c7a48ed"
335+
"id": "compl_ex_Ri9pP5Ch3kcc",
336+
"link": "coding-guidelines/expressions.html#compl_ex_Ri9pP5Ch3kcc",
337+
"checksum": "3ddbea1954a0f70a691558948f360152e8286991f98380ac6b59806e9bb15843"
338338
}
339339
},
340340
{
341341
"id": "gui_ADHABsmK9FXz",
342342
"title": "The 'as' operator should not be used with numeric operands",
343343
"link": "coding-guidelines/expressions.html#gui_ADHABsmK9FXz",
344-
"checksum": "0bb635e94d374bfbd1e37fa38da63e8462e0af6e2ac0486e428830602a0d4aab",
344+
"checksum": "7867cf7094d5cbaef022e5c9bcb57ece839d735a3f4e4a267525ed84052ff8c4",
345345
"rationale": {
346346
"id": "rat_v56bjjcveLxQ",
347347
"link": "coding-guidelines/expressions.html#rat_v56bjjcveLxQ",
348-
"checksum": "70cdef6b5312430960c627c2e9316c593e2dcbb9404366d2c22ef9b93efbd7e4"
348+
"checksum": "c08d0134b6be2441083a240dfb7de83573e07a1a0e02beb55c9f51e4117cab46"
349349
},
350350
"non_compliant_example": {
351351
"id": "non_compl_ex_hzGUYoMnK59w",
352352
"link": "coding-guidelines/expressions.html#non_compl_ex_hzGUYoMnK59w",
353-
"checksum": "288d2fa92a6dbef39c9c269cdc9733ac8fe86a5482df891168d0dfb16e393517"
353+
"checksum": "b0b314db07694861a55ddd3f6549d876e6f42896dc8ef7c6815aaff9e72e14e3"
354354
},
355355
"compliant_example": {
356356
"id": "compl_ex_uilHTIOgxD37",
357357
"link": "coding-guidelines/expressions.html#compl_ex_uilHTIOgxD37",
358-
"checksum": "ecd9215eb440293a21fd8d8830cc2d6a437e137e3892a65200f30c824d2b4981"
358+
"checksum": "89ef76d53fb0d0f354a4f73d3f40df4fa1963e4a507dfa60abb2b57c096fe331"
359359
}
360360
},
361361
{
362362
"id": "gui_PM8Vpf7lZ51U",
363363
"title": "An integer shall not be converted to a pointer",
364364
"link": "coding-guidelines/expressions.html#gui_PM8Vpf7lZ51U",
365-
"checksum": "decbfa633d2027bd4d411099ae0330cec753d3d9675784bddbeab3605d7eef2b",
365+
"checksum": "77cb769c917201ec888703426b47042e803fac6c70ce77e2f3b6951e4c4dddf7",
366366
"rationale": {
367367
"id": "rat_YqhEiWTj9z6L",
368368
"link": "coding-guidelines/expressions.html#rat_YqhEiWTj9z6L",
369-
"checksum": "7ec3a23d38413074c112ac36e30da3dfa49142161c408950d3bf4b260007d8d5"
369+
"checksum": "9f04514a2430fdfbe79634efd1f1afc9fba28491264a1ba31377ec444aa49a65"
370370
},
371371
"non_compliant_example": {
372372
"id": "non_compl_ex_0ydPk7VENSrA",
373373
"link": "coding-guidelines/expressions.html#non_compl_ex_0ydPk7VENSrA",
374-
"checksum": "b872bd6d89f5615c44912fe8e7c8330496001b6c1f8194533fab31132432c7f7"
374+
"checksum": "b8043dc011ae6b40779f388e5c7657ad9037c0b50d82b98f86077ead2d243900"
375375
},
376376
"compliant_example": {
377377
"id": "compl_ex_oneKuF52yzrx",
378378
"link": "coding-guidelines/expressions.html#compl_ex_oneKuF52yzrx",
379-
"checksum": "1bcd0420bc81b89851bde5e9a89ba7cada5113b7badf017ce04591ece55781c1"
379+
"checksum": "8058a5edb08776647f2832faaaaf0650fcbb33792fd7dd523fa3d74020805f26"
380380
}
381381
},
382382
{
383383
"id": "gui_iv9yCMHRgpE0",
384384
"title": "An integer shall not be converted to an invalid pointer",
385385
"link": "coding-guidelines/expressions.html#gui_iv9yCMHRgpE0",
386-
"checksum": "4c5d99788a3517cf7e8859de5639bb3abd32436a830533ca0782f7a33211e9ab",
386+
"checksum": "1e54ee20a66bc7156434925f3dc8054002670a028adad45f8cc8a9648a327d90",
387387
"rationale": {
388388
"id": "rat_OhxKm751axKw",
389389
"link": "coding-guidelines/expressions.html#rat_OhxKm751axKw",
390-
"checksum": "dbbf0c8462ca981ceb377f3552e3284bcc273a702a7f737676bf55479a43fc5c"
390+
"checksum": "f0815a311f224de49ab4ef4efe3b0f56ba5a45da46515d303df70498def9362b"
391391
},
392392
"non_compliant_example": {
393393
"id": "non_compl_ex_CkytKjRQezfQ",
394394
"link": "coding-guidelines/expressions.html#non_compl_ex_CkytKjRQezfQ",
395-
"checksum": "473037b7128094b2ef9e597f11a4e69847c6fca785261a8de9726f4544f8e429"
395+
"checksum": "523ce5a8dcfcd12234f7b65fe107b87164955148e11e03f01eb55f36c9a4458f"
396396
},
397397
"compliant_example": {
398398
"id": "compl_ex_oBoluiKSvREu",
399399
"link": "coding-guidelines/expressions.html#compl_ex_oBoluiKSvREu",
400-
"checksum": "571444f3617e6227def16974de4fd7f57e85622d9cce018f9907fd5b3538825d"
400+
"checksum": "623d93002a37bdbacc99db9f22acb990cd4a4417ecdb6f230b8ca6ebe4c2c8f9"
401401
}
402402
},
403403
{
404404
"id": "gui_RHvQj8BHlz9b",
405405
"title": "Integer shift shall only be performed through `checked_` APIs",
406406
"link": "coding-guidelines/expressions.html#gui_RHvQj8BHlz9b",
407-
"checksum": "b2687edaff5c8c8ea8388b0b867d40ac150360cfd4525d9776b374166e24391b",
407+
"checksum": "7246210baab0ed920eb710992460f0521d7a71390f413bb26127682691a6c157",
408408
"rationale": {
409409
"id": "rat_3MpR8QfHodGT",
410410
"link": "coding-guidelines/expressions.html#rat_3MpR8QfHodGT",
411-
"checksum": "aa8529a2a9fea5848ebbd6998248b068c8d063fcb4bbb62006a6b10884e41897"
411+
"checksum": "f205b8a2ddcbc5e59e4042fd6fb0be3d18bce82de7a5ff83b263507af091bf46"
412412
},
413413
"non_compliant_example": {
414414
"id": "non_compl_ex_O9FZuazu3Lcn",
415415
"link": "coding-guidelines/expressions.html#non_compl_ex_O9FZuazu3Lcn",
416-
"checksum": "69c2b4cbe24b6940e3a4248959670a25b99d2cb75a7ea5b122375179559dd725"
416+
"checksum": "5b03d057c81af3ad7752bbd230b2aecb57472ac3c07e1abc26c2d199ad282c66"
417417
},
418418
"compliant_example": {
419419
"id": "compl_ex_xpPQqYeEPGIo",
420420
"link": "coding-guidelines/expressions.html#compl_ex_xpPQqYeEPGIo",
421-
"checksum": "70a76fe0315b7e0749b95a7183f3dffa23f0bd201906f7461e71ffae3d867349"
421+
"checksum": "426b69e0e7436db70703e2d793fa0d6f5568ee70115e9d2e9f76e85d158699de"
422+
}
423+
},
424+
{
425+
"id": "gui_LvmzGKdsAgI5",
426+
"title": "Do not shift an expression by a negative number of bits or by greater than or equal to the number of bits that exist in the operand",
427+
"link": "coding-guidelines/expressions.html#gui_LvmzGKdsAgI5",
428+
"checksum": "de97a882f4a60255e8b4bc593410a46ac0e4089243fb908513cb9ea121ebb203",
429+
"rationale": {
430+
"id": "rat_tVkDl6gOqz25",
431+
"link": "coding-guidelines/expressions.html#rat_tVkDl6gOqz25",
432+
"checksum": "db1285b8123d325e2c7d0302104d9ec3dd55bec79f5b38de55b00075387ce97b"
433+
},
434+
"non_compliant_example": {
435+
"id": "non_compl_ex_aTtUjdIuDdbv",
436+
"link": "coding-guidelines/expressions.html#non_compl_ex_aTtUjdIuDdbv",
437+
"checksum": "f5296495ba85c5147d0c4a850b504bba71d4dfbcb778f47fcb4e17ebec38319b"
438+
},
439+
"compliant_example": {
440+
"id": "compl_ex_Ux1WqHbGKV73",
441+
"link": "coding-guidelines/expressions.html#compl_ex_Ux1WqHbGKV73",
442+
"checksum": "0eb30df4ee3df3288aa0deca2281e16c1934e704aede63824cb6b05d7e7085ba"
422443
}
423444
}
424445
]

needs.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)