forked from github/codeql-coding-standards
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrules.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 617 should actually have 12 columns, instead of 13 in line 616.
955 lines (955 loc) · 148 KB
/
rules.csv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
Language,Standard,ID,Supportable,Obligation level,Enforcement level,Allocated target,Description,Similar,Package,Difficulty,Justification for querability level
cpp,AUTOSAR,A0-1-1,Yes,Required,Automated,Implementation,A project shall not contain instances of non-volatile variables being given values that are not subsequently used.,M0-1-6,DeadCode,Medium,
cpp,AUTOSAR,A0-1-2,Yes,Required,Automated,Implementation,The value returned by a function having a non-void return type that is not an overloaded operator shall be used.,M0-1-7,DeadCode,Easy,
cpp,AUTOSAR,A0-1-3,Yes,Required,Automated,Implementation,"Every function defined in an anonymous namespace, or static function with internal linkage, or private member function shall be used.",M0-1-10,DeadCode,Easy,
cpp,AUTOSAR,A0-1-4,Yes,Required,Automated,Implementation,There shall be no unused named parameters in non-virtual functions.,,DeadCode,Easy,
cpp,AUTOSAR,A0-1-5,Yes,Required,Automated,Implementation,There shall be no unused named parameters in the set of parameters for a virtual function and all the functions that override it.,,DeadCode,Easy,
cpp,AUTOSAR,A0-1-6,Yes,Advisory,Automated,Implementation,There should be no unused type declarations.,M0-1-5,DeadCode,Easy,
cpp,AUTOSAR,A0-4-1,Yes,Required,Non-Automated,Infrastructure / Toolchain,Floating-point implementation shall comply with IEEE 754 standard.,,Toolchain,Easy,Find certain pairs of types and platforms which are not IEEE 754 compatible.
cpp,AUTOSAR,A0-4-2,Yes,Required,Automated,Implementation,Type long double shall not be used.,,BannedTypes,Easy,
cpp,AUTOSAR,A0-4-3,Yes,Required,Automated,Toolchain,The implementations in the chosen compiler shall strictly comply with the C++14 Language Standard.,,Toolchain,Easy,Find cases where -std=gnu++14 is used instead of -std=c++14. Note: this is currently only possible for compilations that do not use response files.
cpp,AUTOSAR,A0-4-4,Yes,Required,Partially Automated,Implementation,"Range, domain and pole errors shall be checked when using math functions.",,TypeRanges,Hard,
cpp,AUTOSAR,A1-1-1,Yes,Required,Automated,Implementation,All code shall conform to ISO/IEC 14882:2014 - Programming Language C++ and shall not use deprecated features.,,Toolchain,Hard,"Appendix D of the Standard lists depreceated features. List is lengthy, but otherwise easy to write. This can also be compiler checked, so we should confirm that we also want this as a CodeQL check."
cpp,AUTOSAR,A1-1-2,Yes,Required,Non-Automated,Implementation / Toolchain,A warning level of the compilation process shall be set in compliance with project policies.,,Toolchain,Easy,Note: this is currently only possible for compilations that do not use response files.
cpp,AUTOSAR,A1-1-3,Yes,Required,Non-Automated,Toolchain,An optimization option that disregards strict standard compliance shall not be turned on in the chosen compiler.,,Toolchain,Easy,Note: this is currently only possible for compilations that do not use response files.
cpp,AUTOSAR,A1-2-1,No,Required,Non-Automated,Toolchain,"When using a compiler toolchain (including preprocessor, compiler itself, linker, C++ standard libraries) in safety-related software, the tool confidence level (TCL) shall be determined. In case of TCL2 or TCL3, the compiler shall undergo a 'Qualification of a software tool', as per ISO 26262-8.11.4.6 [6].",,,,Allocated target not covered by CodeQL
cpp,AUTOSAR,A1-4-1,No,Required,Non-Automated,Implementation / Verification,Code metrics and their valid boundaries shall be defined and code shall comply with defined boundaries of code metrics.,,,,Allocated target not covered by CodeQL
cpp,AUTOSAR,A1-4-3,No,Advisory,Automated,Implementation,All code should compile free of compiler warnings.,,,,"This should be checked via the compiler output, rather than CodeQL, which adds unnecessary steps."
cpp,AUTOSAR,A10-0-1,Yes,Required,Non-Automated,Design,Public inheritance shall be used to implement 'is-a' relationship.,,Inheritance,Audit,Report a list of Inheritance relationships.
cpp,AUTOSAR,A10-0-2,Yes,Required,Non-Automated,Design,Membership or non-public inheritance shall be used to implement 'has-a' relationship.,,Inheritance,Audit,Report a list of membership relationships.
cpp,AUTOSAR,A10-1-1,Yes,Required,Automated,Implementation,Class shall not be derived from more than one base class which is not an interface class.,,Inheritance,Easy,
cpp,AUTOSAR,A10-2-1,Yes,Required,Automated,Implementation,Non-virtual public or protected member functions shall not be redefined in derived classes.,,VirtualFunctions,Easy,
cpp,AUTOSAR,A10-3-1,Yes,Required,Automated,Implementation,"Virtual function declaration shall contain exactly one of the three specifiers: (1) virtual, (2) override, (3) final.",,VirtualFunctions,Easy,
cpp,AUTOSAR,A10-3-2,Yes,Required,Automated,Implementation,Each overriding virtual function shall be declared with the override or final specifier.,,VirtualFunctions,Easy,
cpp,AUTOSAR,A10-3-3,Yes,Required,Automated,Implementation,Virtual functions shall not be introduced in a final class.,,VirtualFunctions,Easy,
cpp,AUTOSAR,A10-3-5,Yes,Required,Automated,Implementation,A user-defined assignment operator shall not be virtual.,,Operators,Easy,
cpp,AUTOSAR,A10-4-1,Yes,Advisory,Non-Automated,Design,Hierarchies should be based on interface classes.,,Inheritance,Audit,Report a list of hierarchies which don't use interfaces.
cpp,AUTOSAR,A11-0-1,Yes,Advisory,Automated,Implementation,A non-POD type should be defined as class.,,Classes,Easy,
cpp,AUTOSAR,A11-0-2,Yes,Required,Automated,Implementation,"A type defined as struct shall: (1) provide only public data members, (2) not provide any special member functions or methods, (3) not be a base of another struct or class, (4) not inherit from another struct or class.",,Classes,Easy,
cpp,AUTOSAR,A11-3-1,Yes,Required,Automated,Implementation,Friend declarations shall not be used.,cpp/jsf/av-rule-70,BannedSyntax,Easy,
cpp,AUTOSAR,A12-0-1,Yes,Required,Automated,Implementation,"If a class declares a copy or move operation, or a destructor, either via '=default', '=delete', or via a user-provided declaration, then all others of these five special member functions shall be declared as well.",cpp/rule-of-three,Classes,Easy,
cpp,AUTOSAR,A12-0-2,Yes,Required,Partially Automated,Implementation,Bitwise operations and operations that assume data representation in memory shall not be performed on objects.,M5-0-21,Expressions,Medium,
cpp,AUTOSAR,A12-1-1,Yes,Required,Automated,Implementation,"Constructors shall explicitly initialize all virtual base classes, all direct non-virtual base classes and all non-static data members.",M12-1-2,Initialization,Medium,
cpp,AUTOSAR,A12-1-2,Yes,Required,Automated,Implementation,Both NSDMI and a non-static member initializer in a constructor shall not be used in the same type.,,Initialization,Medium,
cpp,AUTOSAR,A12-1-3,Yes,Required,Automated,Implementation,"If all user-defined constructors of a class initialize data members with constant values that are the same across all constructors, then data members shall be initialized using NSDMI instead.",,Initialization,Medium,
cpp,AUTOSAR,A12-1-4,Yes,Required,Automated,Implementation,All constructors that are callable with a single argument of fundamental type shall be declared explicit.,,Initialization,Easy,
cpp,AUTOSAR,A12-1-5,Yes,Required,Partially Automated,Implementation,Common class initialization for non-constant members shall be done by a delegating constructor.,,Initialization,Medium,
cpp,AUTOSAR,A12-1-6,Yes,Required,Automated,Implementation,Derived classes that do not need further explicit initialization and require all the constructors from the base class shall use inheriting constructors.,,Initialization,Easy,
cpp,AUTOSAR,A12-4-1,Yes,Required,Automated,Implementation,"Destructor of a base class shall be public virtual, public override or protected non-virtual.",OOP52-CPP,VirtualFunctions,Easy,
cpp,AUTOSAR,A12-4-2,Yes,Advisory,Automated,Implementation,"If a public destructor of a class is non-virtual, then the class should be declared final.",,VirtualFunctions,Easy,
cpp,AUTOSAR,A12-6-1,Yes,Required,Automated,Implementation,All class data members that are initialized by the constructor shall be initialized using member initializers.,,Classes,Easy,
cpp,AUTOSAR,A12-7-1,Yes,Required,Automated,Implementation,"If the behavior of a user-defined special member function is identical to implicitly defined special member function, then it shall be defined '=default' or be left undefined.",,Classes,Easy,
cpp,AUTOSAR,A12-8-1,Yes,Required,Automated,Implementation,"Move and copy constructors shall move and respectively copy base classes and data members of a class, without any side effects.",M12-8-1,SideEffects2,Hard,
cpp,AUTOSAR,A12-8-2,Yes,Advisory,Automated,Implementation,User-defined copy and move assignment operators should use user-defined no-throw swap function.,,OperatorInvariants,Easy,
cpp,AUTOSAR,A12-8-3,Yes,Required,Partially Automated,Implementation,Moved-from object shall not be read-accessed.,EXP63-CPP,MoveForward,Import,
cpp,AUTOSAR,A12-8-4,Yes,Required,Automated,Implementation,Move constructor shall not initialize its class members and base classes using copy semantics.,,Initialization,Easy,
cpp,AUTOSAR,A12-8-5,Yes,Required,Automated,Implementation,A copy assignment and a move assignment operators shall handle self-assignment.,OOP54-CPP,OperatorInvariants,Import,
cpp,AUTOSAR,A12-8-6,Yes,Required,Automated,Implementation,Copy and move constructors and copy assignment and move assignment operators shall be declared protected or defined '=delete' in base class.,M12-8-2,Operators,Easy,
cpp,AUTOSAR,A12-8-7,Yes,Advisory,Automated,Implementation,Assignment operators should be declared with the ref-qualifier &.,,Operators,Easy,
cpp,AUTOSAR,A13-1-2,Yes,Required,Automated,Implementation,User defined suffixes of the user defined literal operators shall start with underscore followed by one or more letters.,,Naming,Easy,
cpp,AUTOSAR,A13-1-3,Yes,Required,Automated,Implementation,User defined literals operators shall only perform conversion of passed parameters.,,SideEffects2,Easy,
cpp,AUTOSAR,A13-2-1,Yes,Required,Automated,Implementation,An assignment operator shall return a reference to 'this'.,cpp/assignment-does-not-return-this,OperatorInvariants,Easy,
cpp,AUTOSAR,A13-2-2,Yes,Required,Automated,Implementation,A binary arithmetic operator and a bitwise operator shall return a 'prvalue'.,,OperatorInvariants,Easy,
cpp,AUTOSAR,A13-2-3,Yes,Required,Automated,Implementation,A relational operator shall return a boolean value.,,Operators,Easy,
cpp,AUTOSAR,A13-3-1,Yes,Required,Automated,Implementation,A function that contains 'forwarding reference' as its argument shall not be overloaded.,,Operators,Easy,
cpp,AUTOSAR,A13-5-1,Yes,Required,Automated,Implementation,"If 'operator[]' is to be overloaded with a non-const version, const version shall also be implemented.",,Operators,Easy,
cpp,AUTOSAR,A13-5-2,Yes,Required,Automated,Implementation,All user-defined conversion operators shall be defined explicit.,,Operators,Easy,
cpp,AUTOSAR,A13-5-3,Yes,Advisory,Automated,Implementation,User-defined conversion operators should not be used.,,Operators,Easy,
cpp,AUTOSAR,A13-5-4,Yes,Required,Automated,Implementation,"If two opposite operators are defined, one shall be defined in terms of the other.",,OperatorInvariants,Easy,
cpp,AUTOSAR,A13-5-5,Yes,Required,Automated,Implementation,Comparison operators shall be non-member functions with identical parameter types and noexcept.,,Operators,Easy,
cpp,AUTOSAR,A13-6-1,Yes,Required,Automated,Implementation,"Digit sequences separators ' shall only be used as follows: (1) for decimal, every 3 digits, (2) for hexadecimal, every 2 digits, (3) for binary, every 4 digits.",,Literals,Easy,
cpp,AUTOSAR,A14-1-1,Yes,Advisory,Non-Automated,Implementation,A template should check if a specific template argument is suitable for this template.,,Templates,Medium,"Look for classes with default constructors or assignment operators, with a template field which is not copyable/moveable"
cpp,AUTOSAR,A14-5-1,Yes,Required,Automated,Implementation,A template constructor shall not participate in overload resolution for a single argument of the enclosing class type.,M14-5-2,Templates,Easy,
cpp,AUTOSAR,A14-5-2,Yes,Advisory,Partially-Automated,Design,Class members that are not dependent on template class parameters should be defined in a separate base class.,,Classes,Easy,
cpp,AUTOSAR,A14-5-3,Yes,Advisory,Automated,Design,"A non-member generic operator shall only be declared in a namespace that does not contain class (struct) type, enum type or union type declarations.",,Operators,Easy,
cpp,AUTOSAR,A14-7-1,Yes,Required,Automated,Implementation,A type used as a template argument shall provide all members that are used by the template.,M14-7-2,Templates,Easy,
cpp,AUTOSAR,A14-7-2,Yes,Required,Automated,Implementation,"Template specialization shall be declared in the same file (1) as the primary template (2) as a user-defined type, for which the specialization is declared.",,Templates,Easy,
cpp,AUTOSAR,A14-8-2,Yes,Required,Automated,Implementation,Explicit specializations of function templates shall not be used.,M14-8-1,Templates,Easy,
cpp,AUTOSAR,A15-0-1,Yes,Required,Non-Automated,Architecture / Design / Implementation,A function shall not exit with an exception if it is able to complete its task.,,Exceptions1,Audit,Report a list of functions which throw exceptions.
cpp,AUTOSAR,A15-0-2,Yes,Required,Partially Automated,Architecture / Design / Implementation,"At least the basic guarantee for exception safety shall be provided for all operations. In addition, each function may offer either the strong guarantee or the nothrow guarantee",ERR56-CPP,ExceptionSafety,Import,
cpp,AUTOSAR,A15-0-3,Yes,Required,Non-Automated,Implementation,Exception safety guarantee of a called function shall be considered.,,ExceptionSafety,Hard,"There are certain exception safety guarantees we can check, such as exceptions in constructor calls used in emplace (the example from the rule text)."
cpp,AUTOSAR,A15-0-4,Yes,Required,Non-Automated,Architecture / Design / Implementation,Unchecked exceptions shall be used to represent errors from which the caller cannot reasonably be expected to recover.,,Exceptions1,Audit,Report a list of unchecked exceptions.
cpp,AUTOSAR,A15-0-5,Yes,Required,Non-Automated,Architecture / Design / Implementation,Checked exceptions shall be used to represent errors from which the caller can reasonably be expected to recover.,,Exceptions1,Audit,Report a list of checked exceptions.
cpp,AUTOSAR,A15-0-6,No,Required,Non-Automated,Verification / Toolchain,An analysis shall be performed to analyze the failure modes of exception,,,,Allocated target not covered by CodeQL
cpp,AUTOSAR,A15-0-7,No,Required,Partially Automated,Verification / Toolchain,Exception handling mechanism shall guarantee a deterministic worst-case time execution time.,,,,Allocated target not covered by CodeQL
cpp,AUTOSAR,A15-0-8,No,Required,Non-Automated,Verification / Toolchain,"A worst-case execution time (WCET) analysis shall be performed to determine maximum execution time constraints of the software, covering in particular the exceptions processing.",,,,Allocated target not covered by CodeQL
cpp,AUTOSAR,A15-1-1,Yes,Advisory,Automated,Implementation,Only instances of types derived from std::exception should be thrown.,,Exceptions2,Easy,
cpp,AUTOSAR,A15-1-2,Yes,Required,Automated,Implementation,An exception object shall not be a pointer.,,Exceptions1,Easy,
cpp,AUTOSAR,A15-1-3,Yes,Advisory,Automated,Implementation,All thrown exceptions should be unique.,,Exceptions1,Easy,
cpp,AUTOSAR,A15-1-4,Yes,Required,Partially Automated,Implementation,"If a function exits with an exception, then before a throw, the function shall place all objects/resources that the function constructed in valid states or it shall delete them.",ERR57-CPP,ExceptionSafety,Easy,
cpp,AUTOSAR,A15-1-5,Yes,Required,Non-Automated,Implementation,Exceptions shall not be thrown across execution boundaries.,ERR59-CPP,TrustBoundaries,Import,The database holds information about which compiler binary was used for each compilation. This can be used to identify execution boundaries between compilation units.
cpp,AUTOSAR,A15-2-1,Yes,Required,Automated,Implementation,Constructors that are not noexcept shall not be invoked before program startup.,ERR51-CPP,Exceptions1,Medium,
cpp,AUTOSAR,A15-2-2,Yes,Required,Partially Automated,Implementation,"If a constructor is not noexcept and the constructor cannot finish object initialization, then it shall deallocate the object's resources and it shall throw an exception.",ERR57-CPP,Exceptions2,Easy,
cpp,AUTOSAR,A15-3-2,No,Required,Non-Automated,Implementation,"If a function throws an exception, it shall be handled when meaningful actions can be taken, otherwise it shall be propagated.",,,,Difficult to identify when meaningful action could be taken.
cpp,AUTOSAR,A15-3-3,Yes,Required,Partially-Automated,Implementation,"Main function and a task main function shall catch at least: base class exceptions from all third-party libraries used, std::exception and all otherwise unhandled exceptions.",M15-3-2,Exceptions1,Easy,
cpp,AUTOSAR,A15-3-4,Yes,Required,Non-Automated,Implementation,"Catch-all (ellipsis and std::exception) handlers shall be used only in (a) main, (b) task main functions, (c) in functions that are supposed to isolate independent components and (d) when calling third-party code that uses exceptions not according to AUTOSAR C++14 guidelines.",,Exceptions1,Medium,"Identify catch-all handlers which aren't in main, aren't in functions called by std::thread or similar, and aren't wrapping external function calls. We may require some heuristics to exclude other ""isolation"" cases."
cpp,AUTOSAR,A15-3-5,Yes,Required,Automated,Implementation,A class type exception shall be caught by reference or const reference.,M15-3-5,Exceptions2,Easy,
cpp,AUTOSAR,A15-4-1,Yes,Required,Automated,Implementation,Dynamic exception-specification shall not be used.,,Exceptions1,Easy,
cpp,AUTOSAR,A15-4-2,Yes,Required,Automated,Implementation,"If a function is declared to be noexcept, noexcept(true) or noexcept(<true condition>), then it shall not exit with an exception.",M15-5-2,Exceptions1,Medium,
cpp,AUTOSAR,A15-4-3,Yes,Required,Automated,Implementation,"The noexcept specification of a function shall either be identical across all translation units, or identical or more restrictive between a virtual member function and an overrider.",,Exceptions2,Easy,
cpp,AUTOSAR,A15-4-4,Yes,Required,Automated,Implementation,A declaration of non-throwing function shall contain noexcept specification.,,Exceptions1,Easy,
cpp,AUTOSAR,A15-4-5,Yes,Required,Automated,Implementation,Checked exceptions that could be thrown from a function shall be specified together with the function declaration and they shall be identical in all function declarations and for all its overriders.,,Exceptions2,Easy,
cpp,AUTOSAR,A15-5-1,Yes,Required,Automated,Implementation,"All user-provided class destructors, deallocation functions, move constructors, move assignment operators and swap functions shall not exit with an exception. A noexcept exception specification shall be added to these functions as appropriate.",M15-5-1,Exceptions2,Easy,
cpp,AUTOSAR,A15-5-2,Yes,Required,Partially Automated,Implementation,"Program shall not be abruptly terminated. In particular, an implicit or explicit invocation of std::abort(), std::quick_exit(), std::_Exit(), std::terminate() shall not be done.",ERR50-CPP,Exceptions1,Easy,
cpp,AUTOSAR,A15-5-3,Yes,Required,Automated,Implementation,The std::terminate() function shall not be called implicitly.,A15-5-2,Exceptions1,Medium,
cpp,AUTOSAR,A16-0-1,Yes,Required,Automated,Implementation,"The pre-processor shall only be used for unconditional and conditional file inclusion and include guards, and using the following directives: (1) #ifndef, #ifdef, (3) #if, (4) #if defined, (5) #elif, (6) #else, (7) #define, (8) #endif, (9) #include.",M16-2-1,Macros,Easy,
cpp,AUTOSAR,A16-2-1,Yes,Required,Automated,Implementation,"The ', "", /*, //, \ characters shall not occur in a header file name or in #include directive.",M16-2-4,Macros,Easy,
cpp,AUTOSAR,A16-2-2,Yes,Required,Automated,Implementation,There shall be no unused include directives.,cpp/dependency/useless-include,Includes,Hard,https://github.com/github/semmle-code/tree/main/packs/dependency/queries/semmlecode-cpp-queries/Dependency
cpp,AUTOSAR,A16-2-3,No,Required,Non-Automated,Implementation,An include directive shall be added explicitly for every symbol used in a file.,,,,There is no automated way to identify which headers are intended to be imported for each symbol. For the standard library we could scrape the documentation to determine which symbol is supposed to come from which header but the expected value is low.
cpp,AUTOSAR,A16-6-1,Yes,Required,Automated,Implementation,#error directive shall not be used.,,Macros,Easy,
cpp,AUTOSAR,A16-7-1,Yes,Required,Automated,Implementation,The #pragma directive shall not be used.,,Macros,Easy,
cpp,AUTOSAR,A17-0-1,Yes,Required,Automated,Implementation,"Reserved identifiers, macros and functions in the C++ standard library shall not be defined, redefined or undefined.",M17-0-1,BannedLibraries,Medium,
cpp,AUTOSAR,A17-0-2,No,Required,Non-Automated,Implementation,All project's code including used libraries (including standard and user-defined libraries) and any third-party user code shall conform to the AUTOSAR C++14 Coding Guidelines.,,,,"Self-referential. This is, in practice, covered by the rest of the queries, so I don't think we would have a specific query for this."
cpp,AUTOSAR,A17-1-1,Yes,Required,Non-Automated,Implementation,Use of the C Standard Library shall be encapsulated and isolated.,,Functions,Medium,Enforce that functions which call cstd functions are only calling cstd functions.
cpp,AUTOSAR,A17-6-1,Yes,Required,Automated,Implementation,Non-standard entities shall not be added to standard namespaces.,DCL58-CPP,Scope,Import,
cpp,AUTOSAR,A18-0-1,Yes,Required,Automated,Implementation,The C library facilities shall only be accessed through C++ library headers.,M18-0-1,BannedLibraries,Easy,
cpp,AUTOSAR,A18-0-2,Yes,Required,Automated,Implementation,The error state of a conversion from string to a numeric value shall be checked.,M18-0-2,TypeRanges,Medium,
cpp,AUTOSAR,A18-0-3,Yes,Required,Automated,Implementation,The library <clocale> (locale.h) and the setlocale function shall not be used.,,BannedLibraries,Easy,
cpp,AUTOSAR,A18-1-1,Yes,Required,Automated,Implementation,C-style arrays shall not be used.,,BannedSyntax,Easy,
cpp,AUTOSAR,A18-1-2,Yes,Required,Automated,Implementation,The std::vector<bool> specialization shall not be used.,,BannedTypes,Easy,
cpp,AUTOSAR,A18-1-3,Yes,Required,Automated,Implementation,The std::auto_ptr type shall not be used.,,BannedTypes,Easy,
cpp,AUTOSAR,A18-1-4,Yes,Required,Automated,Implementation,A pointer pointing to an element of an array of objects shall not be passed to a smart pointer of single object type.,,Pointers,Medium,
cpp,AUTOSAR,A18-1-6,Yes,Required,Automated,Implementation,All std::hash specializations for user-defined types shall have a noexcept function call operator.,,OperatorInvariants,Easy,
cpp,AUTOSAR,A18-5-1,Yes,Required,Automated,Implementation,"Functions malloc, calloc, realloc and free shall not be used.",,BannedFunctions,Easy,
cpp,AUTOSAR,A18-5-10,Yes,Required,Automated,Implementation,Placement new shall be used only with properly aligned pointers to sufficient storage capacity.,MEM54-CPP,Allocations,Import,
cpp,AUTOSAR,A18-5-11,Yes,Required,Automated,Implementation,operator new' and 'operator delete' shall be defined together.,DCL54-CPP,Declarations,Easy,
cpp,AUTOSAR,A18-5-2,Yes,Required,Partially Automated,Implementation,Non-placement new or delete expressions shall not be used.,,Allocations,Hard,
cpp,AUTOSAR,A18-5-3,Yes,Required,Automated,Implementation,The form of the delete expression shall match the form of the new expression used to allocate the memory.,cpp/new-free-mismatch?,Freed,Very Hard,
cpp,AUTOSAR,A18-5-4,Yes,Required,Automated,Implementation,"If a project has sized or unsized version of operator 'delete' globally defined, then both sized and unsized versions shall be defined.",,Declarations,Easy,
cpp,AUTOSAR,A18-5-5,Yes,Required,Partially Automated,Toolchain,"Memory management functions shall ensure the following: (a) deterministic behavior resulting with the existence of worst-case execution time, (b) avoiding memory fragmentation, (c) avoid running out of memory, (d) 349 of 510 Document ID 839: AUTOSAR_RS_CPP14Guidelines",,Invariants,Hard,
cpp,AUTOSAR,A18-5-6,Yes,Required,Non-Automated,Verification / Toolchain,"An analysis shall be performed to analyze the failure modes of dynamic memory management. In particular, the following failure modes shall be analyzed: (a) non-deterministic behavior resulting with nonexistence of worst-case execution time, (b) memory fragmentation, (c) running out of memory, (d) mismatched allocations and deallocations, (e) dependence on non-deterministic calls to kernel.",,Allocations,Audit,Produce a list of allocations in the program.
cpp,AUTOSAR,A18-5-7,No,Required,Non-Automated,Implementation,"If non-realtime implementation of dynamic memory management functions is used in the project, then memory shall only be allocated and deallocated during non-realtime program phases.",,,,No specific ideas for implementing this.
cpp,AUTOSAR,A18-5-8,Yes,Required,Partially Automated,Implementation,Objects that do not outlive a function shall have automatic storage duration.,,Allocations,Medium,
cpp,AUTOSAR,A18-5-9,Yes,Required,Automated,Implementation,Custom implementations of dynamic memory allocation and deallocation functions shall meet the semantic requirements specified in the corresponding 'Required behaviour' clause from the C++ Standard.,MEM55-CPP,Allocations,Import,
cpp,AUTOSAR,A18-9-1,Yes,Required,Automated,Implementation,The std::bind shall not be used.,,BannedFunctions,Easy,
cpp,AUTOSAR,A18-9-2,Yes,Required,Automated,Implementation,"Forwarding values to other functions shall be done via: (1) std::move if the value is an rvalue reference, (2) std::forward if the value is forwarding reference.",,MoveForward,Medium,
cpp,AUTOSAR,A18-9-3,Yes,Required,Automated,Implementation,The std::move shall not be used on objects declared const or const&.,,MoveForward,Easy,
cpp,AUTOSAR,A18-9-4,Yes,Required,Automated,Implementation,An argument to std::forward shall not be subsequently used.,,MoveForward,Medium,
cpp,AUTOSAR,A2-10-1,Yes,Required,Automated,Architecture / Design / Implementation,An identifier declared in an inner scope shall not hide an identifier declared in an outer scope.,M2-10-2,Naming,Easy,
cpp,AUTOSAR,A2-10-4,Yes,Required,Automated,Implementation,The identifier name of a non-member object with static storage duration or static function shall not be reused within a namespace.,M2-10-5,Naming,Easy,
cpp,AUTOSAR,A2-10-5,Yes,Advisory,Automated,Design / Implementation,An identifier name of a function with static storage duration or a non-member object with external or internal linkage should not be reused.,M2-10-5,Naming,Easy,
cpp,AUTOSAR,A2-10-6,Yes,Required,Automated,Implementation,"A class or enumeration name shall not be hidden by a variable, function or enumerator declaration in the same scope.",M2-10-6,Naming,Easy,
cpp,AUTOSAR,A2-11-1,Yes,Required,Automated,Design / Implementation,Volatile keyword shall not be used.,cpp/jsf/av-rule-205,BannedSyntax,Easy,
cpp,AUTOSAR,A2-13-1,Yes,Required,Automated,Architecture / Design / Implementation,Only those escape sequences that are defined in ISO/IEC 14882:2014 shall be used.,M2-13-1,Literals,Easy,
cpp,AUTOSAR,A2-13-2,No,Required,Automated,Implementation,String literals with different encoding prefixes shall not be concatenated.,M2-13-5,,,"From the sample, it looks like this is compiler enforced."
cpp,AUTOSAR,A2-13-3,Yes,Required,Automated,Architecture / Design / Implementation,Type wchar_t shall not be used.,,BannedTypes,Easy,
cpp,AUTOSAR,A2-13-4,Yes,Required,Automated,Architecture / Design / Implementation,String literals shall not be assigned to non-constant pointers.,,Strings,Easy,
cpp,AUTOSAR,A2-13-5,Yes,Advisory,Automated,Implementation,Hexadecimal constants should be upper case.,,Literals,Easy,
cpp,AUTOSAR,A2-13-6,Yes,Required,Automated,Architecture / Design / Implementation,Universal character names shall be used only inside character or string literals.,,Naming,Easy,
cpp,AUTOSAR,A2-3-1,Yes,Required,Automated,Architecture / Design / Implementation,Only those characters specified in the C++ Language Standard basic source character set shall be used in the source code.,,Naming,Easy,"We can only provide partial coverage for this rule, because we have a semantic not syntactic model of the code."
cpp,AUTOSAR,A2-5-1,No,Required,Automated,Implementation,Trigraphs shall not be used.,,,,Trigraphs/digraphs are implemented by the preprocessor in a such a way that we may not have that information in our database. We could look for compiler flags here.
cpp,AUTOSAR,A2-5-2,No,Required,Automated,Implementation,Digraphs shall not be used.,,,,Trigraphs/digraphs are implemented by the preprocessor in a such a way that we may not have that information in our database. We could look for compiler flags here.
cpp,AUTOSAR,A2-7-1,Yes,Required,Automated,Implementation,The character \ shall not occur as a last character of a C++ comment.,,Comments,Easy,
cpp,AUTOSAR,A2-7-2,Yes,Required,Non-Automated,Implementation,Sections of code shall not be 'commented out'.,M2-7-2,Comments,Easy,We can write a heuristic query that looks for code markers in comments.
cpp,AUTOSAR,A2-7-3,Yes,Required,Automated,Implementation,"All declarations of 'user-defined' types, static and non-static data members, functions and methods shall be preceded by documentation.",,Comments,Easy,
cpp,AUTOSAR,A2-7-5,No,Required,Non-Automated,Implementation,"Comments shall not document any actions or sources (e.g. tables, figures, paragraphs, etc.) that are outside of the file.",,,,Difficult to ascertain programmatically
cpp,AUTOSAR,A2-8-1,No,Required,Non-Automated,Architecture / Design / Implementation,A header file name should reflect the logical entity for which it provides declarations.,,,,Difficult to ascertain programmatically
cpp,AUTOSAR,A2-8-2,No,Advisory,Non-Automated,Architecture / Design / Implementation,An implementation file name should reflect the logical entity for which it provides definitions.,,,,Difficult to ascertain programmatically
cpp,AUTOSAR,A20-8-1,Yes,Required,Automated,Implementation,An already-owned pointer value shall not be stored in an unrelated smart pointer.,MEM56-CPP,SmartPointers1,Import,
cpp,AUTOSAR,A20-8-2,Yes,Required,Automated,Implementation,A std::unique_ptr shall be used to represent exclusive ownership.,,SmartPointers1,Hard,
cpp,AUTOSAR,A20-8-3,Yes,Required,Automated,Implementation,A std::shared_ptr shall be used to represent shared ownership.,,SmartPointers1,Hard,
cpp,AUTOSAR,A20-8-4,Yes,Required,Automated,Implementation,A std::unique_ptr shall be used over std::shared_ptr if ownership sharing is not required.,,SmartPointers1,Hard,
cpp,AUTOSAR,A20-8-5,Yes,Required,Automated,Implementation,std::make_unique shall be used to construct objects owned by std::unique_ptr.,,SmartPointers1,Easy,
cpp,AUTOSAR,A20-8-6,Yes,Required,Automated,Implementation,std::make_shared shall be used to construct objects owned by std::shared_ptr.,,SmartPointers1,Easy,
cpp,AUTOSAR,A20-8-7,Yes,Required,Non-Automated,Implementation,A std::weak_ptr shall be used to represent temporary shared ownership.,,SmartPointers2,Hard,"We can find some specific cases here: mutual assignment of two variables, for example."
cpp,AUTOSAR,A21-8-1,Yes,Required,Automated,Implementation,Arguments to character-handling functions shall be representable as an unsigned char.,STR37-C,TypeRanges,Hard,
cpp,AUTOSAR,A23-0-1,Yes,Required,Automated,Implementation,An iterator shall not be implicitly converted to const_iterator.,,Iterators,Easy,
cpp,AUTOSAR,A23-0-2,Yes,Required,Automated,Implementation,"Elements of a container shall only be accessed via valid references, iterators, and pointers.",CTR51-CPP,Iterators,Import,
cpp,AUTOSAR,A25-1-1,Yes,Required,Automated,Implementation,Non-static data members or captured values of predicate function objects that are state related to this object's identity shall not be copied.,CTR58-CPP,SideEffects2,Import,
cpp,AUTOSAR,A25-4-1,Yes,Required,Non-Automated,Implementation,Ordering predicates used with associative containers and STL sorting and related algorithms shall adhere to a strict weak ordering relation.,CTR57-CPP,Invariants,Import,Hard to determine in general. Easiest is likely the irreflexivity clause (specifically using std::less_equal and similar library functions)
cpp,AUTOSAR,A26-5-1,Yes,Required,Automated,Implementation,Pseudorandom numbers shall not be generated using std::rand().,MSC50-CPP,BannedFunctions,Import,
cpp,AUTOSAR,A26-5-2,Yes,Required,Automated,Implementation,Random number engines shall not be default-initialized.,MSC51-CPP,Initialization,Easy,
cpp,AUTOSAR,A27-0-1,Yes,Required,Non-Automated,Implementation,Inputs from independent components shall be validated.,,TypeRanges,Medium,"We can perform some checking here assuming: we have annotations which determine the boundaries between components, and the appropriate checks that should be performed."
cpp,AUTOSAR,A27-0-2,Yes,Advisory,Automated,Implementation,A C-style string shall guarantee sufficient space for data and the null terminator.,STR50-CPP,Strings,Import,
cpp,AUTOSAR,A27-0-3,Yes,Required,Automated,Implementation,Alternate input and output operations on a file stream shall not be used without an intervening flush or positioning call.,FIO50-CPP,IO,Import,
cpp,AUTOSAR,A27-0-4,Yes,Required,Automated,Implementation,C-style strings shall not be used.,,Strings,Hard,
cpp,AUTOSAR,A3-1-1,Yes,Required,Automated,Architecture / Design / Implementation,It shall be possible to include any header file in multiple translation units without violating the One Definition Rule.,M3-1-1,Includes,Easy,
cpp,AUTOSAR,A3-1-2,Yes,Required,Automated,Architecture / Design / Implementation,"Header files, that are defined locally in the project, shall have a file name extension of one of: "".h"", "".hpp"" or "".hxx"".",cpp/jsf/av-rule-53,Includes,Easy,
cpp,AUTOSAR,A3-1-3,Yes,Advisory,Automated,Architecture / Design / Implementation,"Implementation files, that are defined locally in the project, should have a file name extension of "".cpp"".",,Includes,Easy,
cpp,AUTOSAR,A3-1-4,Yes,Required,Automated,Design / Implementation,"When an array with external linkage is declared, its size shall be stated explicitly.",M3-1-3,Scope,Easy,
cpp,AUTOSAR,A3-1-5,Yes,Required,Partially-Automated,Design,A function definition shall only be placed in a class definition if (1) the function is intended to be inlined (2) it is a member function template (3) it is a member function of a class template.,,Classes,Medium,
cpp,AUTOSAR,A3-1-6,Yes,Advisory,Automated,Design,Trivial accessor and mutator functions should be inlined.,,Functions,Easy,
cpp,AUTOSAR,A3-3-1,Yes,Required,Automated,Implementation,Objects or functions with external linkage (including members of named namespaces) shall be declared in a header file.,M3-3-1,Includes,Easy,
cpp,AUTOSAR,A3-3-2,Yes,Required,Automated,Implementation,Static and thread-local objects shall be constant-initialized.,DCL56-CPP,Initialization,Medium,
cpp,AUTOSAR,A3-8-1,Yes,Required,Non-Automated,Implementation,An object shall not be accessed outside of its lifetime.,EXP54-CPP,Freed,Import,"A replica of a CERT-CPP rule, there are numerous specific cases we can cover."
cpp,AUTOSAR,A3-9-1,Yes,Required,Automated,Implementation,"Fixed width integer types from <cstdint>, indicating the size and signedness, shall be used in place of the basic numerical types.",M3-9-2,Declarations,Easy,
cpp,AUTOSAR,A4-10-1,Yes,Required,Automated,Architecture / Design / Implementation,Only nullptr literal shall be used as the null-pointer-constant.,,Literals,Easy,
cpp,AUTOSAR,A4-5-1,Yes,Required,Automated,Implementation,"Expressions with type enum or enum class shall not be used as operands to built-in and overloaded operators other than the subscript operator [ ], the assignment operator =, the equality operators == and ! =, the unary & operator, and the relational operators <, <=, >, >=.",M4-5-2,Expressions,Easy,
cpp,AUTOSAR,A4-7-1,Yes,Required,Automated,Implementation,An integer expression shall not lead to data loss.,M5-0-6,IntegerConversion,Very Hard,
cpp,AUTOSAR,A5-0-1,Yes,Required,Automated,Implementation,The value of an expression shall be the same under any order of evaluation that the standard permits.,M5-0-1,OrderOfEvaluation,Hard,
cpp,AUTOSAR,A5-0-2,Yes,Required,Automated,Implementation,The condition of an if-statement and the condition of an iteration statement shall have type bool.,M5-0-13,Conditionals,Easy,
cpp,AUTOSAR,A5-0-3,Yes,Required,Automated,Implementation,The declaration of objects shall contain no more than two levels of pointer indirection.,M5-0-19,Pointers,Easy,
cpp,AUTOSAR,A5-0-4,Yes,Required,Automated,Implementation,Pointer arithmetic shall not be used with pointers to non-final classes.,CTR56-CPP,Pointers,Easy,
cpp,AUTOSAR,A5-1-1,Yes,Required,Partially Automated,Implementation,"Literal values shall not be used apart from type initialization, otherwise symbolic names shall be used instead.",,Literals,Easy,
cpp,AUTOSAR,A5-1-2,Yes,Required,Automated,Implementation,Variables shall not be implicitly captured in a lambda expression.,,Lambdas,Easy,
cpp,AUTOSAR,A5-1-3,Yes,Required,Automated,Implementation,Parameter list (possibly empty) shall be included in every lambda expression.,,Lambdas,Easy,
cpp,AUTOSAR,A5-1-4,Yes,Required,Automated,Implementation,A lambda expression object shall not outlive any of its reference-captured objects.,EXP61-CPP,Lambdas,Import,
cpp,AUTOSAR,A5-1-6,Yes,Advisory,Automated,Implementation,Return type of a non-void return type lambda expression should be explicitly specified.,,Lambdas,Easy,
cpp,AUTOSAR,A5-1-7,Yes,Required,Automated,Implementation,A lambda shall not be an operand to decltype or typeid.,,Lambdas,Easy,
cpp,AUTOSAR,A5-1-8,Yes,Advisory,Automated,Implementation,Lambda expressions should not be defined inside another lambda expression.,,Lambdas,Easy,
cpp,AUTOSAR,A5-1-9,Yes,Advisory,Automated,Implementation,Identical unnamed lambda expressions shall be replaced with a named function or a named lambda expression.,,Lambdas,Very Hard,
cpp,AUTOSAR,A5-10-1,Yes,Required,Automated,Implementation,A pointer to member virtual function shall only be tested for equality with null-pointer-constant.,,Pointers,Medium,
cpp,AUTOSAR,A5-16-1,Yes,Required,Automated,Implementation,The ternary conditional operator shall not be used as a sub-expression.,,BannedSyntax,Easy,
cpp,AUTOSAR,A5-2-1,Yes,Advisory,Automated,Implementation,dynamic_cast should not be used.,,BannedSyntax,Easy,
cpp,AUTOSAR,A5-2-2,Yes,Required,Automated,Implementation,Traditional C-style casts shall not be used.,,BannedSyntax,Easy,
cpp,AUTOSAR,A5-2-3,Yes,Required,Automated,Implementation,A cast shall not remove any const or volatile qualification from the type of a pointer or reference.,EXP55-CPP,Const,Import,
cpp,AUTOSAR,A5-2-4,Yes,Required,Automated,Implementation,reinterpret_cast shall not be used.,M5-2-7,BannedSyntax,Easy,
cpp,AUTOSAR,A5-2-5,Yes,Required,Automated,Implementation,An array or container shall not be accessed beyond its range.,CTR50-CPP,OutOfBounds,Import,
cpp,AUTOSAR,A5-2-6,Yes,Required,Automated,Implementation,The operands of a logical && or || shall be parenthesized if the operands contain binary operators.,M5-2-1,OrderOfEvaluation,Easy,
cpp,AUTOSAR,A5-3-1,Yes,Required,Non-Automated,Implementation,Evaluation of the operand to the typeid operator shall not contain side effects.,,SideEffects1,Easy,"We will make use of a shared ""side-effects"" library for this query."
cpp,AUTOSAR,A5-3-2,Yes,Required,Partially Automated,Implementation,Null pointers shall not be dereferenced.,,Null,Very Hard,
cpp,AUTOSAR,A5-3-3,Yes,Required,Automated,Implementation,Pointers to incomplete class types shall not be deleted.,EXP57-CPP,Pointers,Easy,
cpp,AUTOSAR,A5-5-1,Yes,Required,Automated,Implementation,A pointer to member shall not access non-existent class members.,OOP55-CPP,Pointers,Import,
cpp,AUTOSAR,A5-6-1,Yes,Required,Automated,Implementation,The right hand operand of the integer division or remainder operators shall not be equal to zero.,,Expressions,Hard,
cpp,AUTOSAR,A6-2-1,Yes,Required,Automated,Implementation,"Move and copy assignment operators shall either move or respectively copy base classes and data members of a class, without any side effects.",,SideEffects2,Hard,
cpp,AUTOSAR,A6-2-2,Yes,Required,Automated,Implementation,Expression statements shall not be explicit calls to constructors of temporary objects only.,,OrderOfEvaluation,Easy,
cpp,AUTOSAR,A6-4-1,Yes,Required,Automated,Implementation,"A switch statement shall have at least two case-clauses, distinct from the default label.",cpp/trivial-switch,Conditionals,Easy,
cpp,AUTOSAR,A6-5-1,Yes,Required,Automated,Implementation,A for-loop that loops through all elements of the container and does not use its loop-counter shall not be used.,,Loops,Easy,
cpp,AUTOSAR,A6-5-2,Yes,Required,Automated,Implementation,A for loop shall contain a single loop-counter which shall not have floating-point type.,M6-5-1,Loops,Easy,
cpp,AUTOSAR,A6-5-3,Yes,Advisory,Automated,Implementation,Do statements should not be used.,,Loops,Easy,
cpp,AUTOSAR,A6-5-4,Yes,Advisory,Automated,Implementation,For-init-statement and expression should not perform actions other than loop-counter initialization and modification.,,Loops,Easy,
cpp,AUTOSAR,A6-6-1,Yes,Required,Automated,Implementation,The goto statement shall not be used.,cpp/jpl-c/simple-control-flow-goto,BannedSyntax,Easy,
cpp,AUTOSAR,A7-1-1,Yes,Required,Automated,Implementation,Constexpr or const specifiers shall be used for immutable data declaration.,,Const,Hard,
cpp,AUTOSAR,A7-1-2,Yes,Required,Automated,Implementation,The constexpr specifier shall be used for values that can be determined at compile time.,,Const,Medium,
cpp,AUTOSAR,A7-1-3,Yes,Required,Automated,Implementation,CV-qualifiers shall be placed on the right hand side of the type that is a typedef or a using name.,,Const,Easy,
cpp,AUTOSAR,A7-1-4,Yes,Required,Automated,Implementation,The register keyword shall not be used.,,BannedSyntax,Easy,
cpp,AUTOSAR,A7-1-5,Yes,Required,Automated,Implementation,"The auto specifier shall not be used apart from following cases: (1) to declare that a variable has the same type as return type of a function call, (2) to declare that a variable has the same type as initializer of non-fundamental type, (3) to declare parameters of a generic lambda expression, (4) to declare a function template using trailing return type syntax.",,Declarations,Medium,
cpp,AUTOSAR,A7-1-6,Yes,Required,Automated,Implementation,The typedef specifier shall not be used.,,BannedSyntax,Easy,
cpp,AUTOSAR,A7-1-7,Yes,Required,Automated,Implementation,Each expression statement and identifier declaration shall be placed on a separate line.,,Declarations,Easy,
cpp,AUTOSAR,A7-1-8,Yes,Required,Automated,Implementation,A non-type specifier shall be placed before a type specifier in a declaration.,,Declarations,Easy,
cpp,AUTOSAR,A7-1-9,Yes,Required,Automated,Implementation,"A class, structure, or enumeration shall not be declared in the definition of its type.",,Declarations,Easy,
cpp,AUTOSAR,A7-2-1,Yes,Required,Automated,Implementation,An expression with enum underlying type shall only have values corresponding to the enumerators of the enumeration.,M7-2-1,TypeRanges,Hard,
cpp,AUTOSAR,A7-2-2,Yes,Required,Automated,Implementation,Enumeration underlying base type shall be explicitly defined.,,Declarations,Easy,
cpp,AUTOSAR,A7-2-3,Yes,Required,Automated,Implementation,Enumerations shall be declared as scoped enum classes.,,Declarations,Easy,
cpp,AUTOSAR,A7-2-4,Yes,Required,Automated,Implementation,"In an enumeration, either (1) none, (2) the first or (3) all enumerators shall be initialized.",M8-5-3,Declarations,Easy,
cpp,AUTOSAR,A7-2-5,Yes,Advisory,Non-Automated,Design,Enumerations should be used to represent sets of related named constants.,,TypeRanges,Audit,List all enumerations
cpp,AUTOSAR,A7-3-1,Yes,Required,Automated,Implementation,All overloads of a function shall be visible from where it is called.,M7-3-5,Scope,Easy,
cpp,AUTOSAR,A7-4-1,Yes,Required,Automated,Implementation,The asm declaration shall not be used.,,BannedSyntax,Easy,
cpp,AUTOSAR,A7-5-1,Yes,Required,Automated,Implementation,A function shall not return a reference or a pointer to a parameter that is passed by reference to const.,,Functions,Easy,
cpp,AUTOSAR,A7-5-2,Yes,Required,Automated,Implementation,"Functions shall not call themselves, either directly or indirectly.",M7-5-4,Functions,Easy,
cpp,AUTOSAR,A7-6-1,Yes,Required,Automated,Implementation,Functions declared with the [[noreturn]] attribute shall not return.,MSC53-CPP,Functions,Import,
cpp,AUTOSAR,A8-2-1,Yes,Required,Automated,Implementation,"When declaring function templates, the trailing return type syntax shall be used if the return type depends on the type of parameters.",,Templates,Easy,
cpp,AUTOSAR,A8-4-1,Yes,Required,Automated,Implementation,Functions shall not be defined using the ellipsis notation.,M8-4-1,BannedSyntax,Easy,
cpp,AUTOSAR,A8-4-10,Yes,Required,Automated,Design,A parameter shall be passed by reference if it can't be NULL,,Null,Hard,
cpp,AUTOSAR,A8-4-11,Yes,Required,Automated,Design,A smart pointer shall only be used as a parameter type if it expresses lifetime semantics,,SmartPointers1,Medium,
cpp,AUTOSAR,A8-4-12,Yes,Required,Automated,Design,A std::unique_ptr shall be passed to a function as: (1) a copy to express the function assumes ownership (2) an lvalue reference to express that the function replaces the managed object.,,SmartPointers1,Medium,
cpp,AUTOSAR,A8-4-13,Yes,Required,Automated,Design,A std::shared_ptr shall be passed to a function as: (1) a copy to express the function shares ownership (2) an lvalue reference to express that the function replaces the managed object (3) a const lvalue reference to express that the function retains a reference count.,,SmartPointers1,Medium,
cpp,AUTOSAR,A8-4-14,No,Required,Non-Automated,Design,Interfaces shall be precisely and strongly typed.,,,,Difficult to ascertain programmatically
cpp,AUTOSAR,A8-4-2,Yes,Required,Automated,Implementation,All exit paths from a function with non-void return type shall have an explicit return statement with an expression.,M8-4-3,Functions,Easy,
cpp,AUTOSAR,A8-4-3,No,Advisory,Non-Automated,Design,Common ways of passing parameters should be used.,,,,The practical parts of this are covered by other rules (such as A8-4-5 to A8-4-9)
cpp,AUTOSAR,A8-4-4,Yes,Advisory,Automated,Design,Multiple output values from a function should be returned as a struct or tuple.,,Functions,Easy,
cpp,AUTOSAR,A8-4-5,Yes,Required,Automated,Design,'consume' parameters declared as X && shall always be moved from.,,MoveForward,Easy,
cpp,AUTOSAR,A8-4-6,Yes,Required,Automated,Design,'forward' parameters declared as T && shall always be forwarded.,,MoveForward,Easy,
cpp,AUTOSAR,A8-4-7,Yes,Required,Automated,Design,'in' parameters for 'cheap to copy' types shall be passed by value.,,Classes,Easy,
cpp,AUTOSAR,A8-4-8,Yes,Required,Automated,Design,Output parameters shall not be used.,,Const,Easy,
cpp,AUTOSAR,A8-4-9,Yes,Required,Automated,Design,'in-out' parameters declared as T & shall be modified.,,Const,Medium,
cpp,AUTOSAR,A8-5-0,Yes,Required,Automated,Implementation,All memory shall be initialized before it is read.,M8-5-1,Uninitialized,Very Hard,
cpp,AUTOSAR,A8-5-1,Yes,Required,Automated,Implementation,"In an initialization list, the order of initialization shall be following: (1) virtual base classes in depth and left to right order of the inheritance graph, (2) direct base classes in left to right order of inheritance list, (3) non-static data members in the order they were declared in the class definition.",,Initialization,Easy,
cpp,AUTOSAR,A8-5-2,Yes,Required,Automated,Implementation,"Braced-initialization {}, without equals sign, shall be used for variable initialization.",,Initialization,Easy,
cpp,AUTOSAR,A8-5-3,Yes,Required,Automated,Implementation,A variable of type auto shall not be initialized using {} or ={} braced-initialization.,,Initialization,Easy,
cpp,AUTOSAR,A8-5-4,Yes,Advisory,Automated,Implementation,"If a class has a user-declared constructor that takes a parameter of type std::initializer_list, then it shall be the only constructor apart from special member function constructors.",,Initialization,Easy,
cpp,AUTOSAR,A9-3-1,Yes,Required,Partially Automated,Implementation,Member functions shall not return non-const 'raw' pointers or references to private or protected data owned by the class.,M9-3-2,Classes,Hard,
cpp,AUTOSAR,A9-5-1,Yes,Required,Automated,Implementation,Unions shall not be used.,M9-5-1,BannedSyntax,Easy,
cpp,AUTOSAR,A9-6-1,Yes,Required,Partially Automated,Design,"Data types used for interfacing with hardware or conforming to communication protocols shall be trivial, standard-layout and only contain members of types with defined sizes.",,Classes,Medium,
cpp,AUTOSAR,A9-6-2,Yes,Required,Non-Automated,Design,Bit-fields shall be used only when interfacing to hardware or conforming to communication protocols.,,Representation,Audit,Produce an audit list. Omit items from the audit list which have an appropriate annotation.
cpp,AUTOSAR,M0-1-1,Yes,Required,Automated,Implementation,A project shall not contain unreachable code.,cpp/jsf/av-rule-186,DeadCode,Easy,
cpp,AUTOSAR,M0-1-10,Yes,Advisory,Automated,Implementation,Every defined function should be called at least once.,cpp/unused-static-function,DeadCode,Easy,
cpp,AUTOSAR,M0-1-2,Yes,Required,Automated,Implementation,A project shall not contain infeasible paths.,,DeadCode,Very Hard,
cpp,AUTOSAR,M0-1-3,Yes,Required,Automated,Implementation,A project shall not contain unused variables.,cpp/unused-static-variable and ,DeadCode,Easy,
cpp,AUTOSAR,M0-1-4,Yes,Required,Automated,Implementation,A project shall not contain non-volatile POD variables having only one use.,,DeadCode,Easy,
cpp,AUTOSAR,M0-1-8,Yes,Required,Automated,Implementation,All functions with void return type shall have external side effect(s).,,SideEffects2,Medium,
cpp,AUTOSAR,M0-1-9,Yes,Required,Automated,Implementation,There shall be no dead code.,cpp/dead-code-condition???,DeadCode,Medium,
cpp,AUTOSAR,M0-2-1,Yes,Required,Automated,Implementation,An object shall not be assigned to an overlapping object.,,Representation,Hard,
cpp,AUTOSAR,M0-3-1,No,Required,Non-Automated,Implementation / Verification,Minimization of run-time failures shall be ensured by the use of at least one of: (a) static analysis tools/techniques; (b) dynamic analysis tools/techniques; (c) explicit coding of checks to handle run-time faults.,,,,Allocated target not covered by CodeQL
cpp,AUTOSAR,M0-3-2,Yes,Required,Non-Automated,Implementation,"If a function generates error information, then that error information shall be tested.",cpp/jpl-c/checking-return-values???,Expressions,Medium,"We can identify certain common error cases (return value, return parameter, global parameter) and confirm they have been checked."
cpp,AUTOSAR,M0-4-1,No,Required,Non-Automated,Implementation,Use of scaled-integer or fixed-point arithmetic shall be documented.,,,,Documentation not covered by queries
cpp,AUTOSAR,M0-4-2,No,Required,Non-Automated,Implementation,Use of floating-point arithmetic shall be documented.,,,,Documentation not covered by queries
cpp,AUTOSAR,M1-0-2,No,Required,Non-Automated,Toolchain,"Multiple compilers shall only be used if they have a common, defined interface.",,,,Allocated target not covered by CodeQL
cpp,AUTOSAR,M10-1-1,Yes,Advisory,Automated,Implementation,Classes should not be derived from virtual bases.,,Inheritance,Easy,
cpp,AUTOSAR,M10-1-2,Yes,Required,Automated,Implementation,A base class shall only be declared virtual if it is used in a diamond hierarchy.,,Inheritance,Easy,
cpp,AUTOSAR,M10-1-3,Yes,Required,Automated,Implementation,An accessible base class shall not be both virtual and non-virtual in the same hierarchy.,,Inheritance,Easy,
cpp,AUTOSAR,M10-2-1,Yes,Advisory,Automated,Implementation,All accessible entity names within a multiple inheritance hierarchy should be unique.,,Inheritance,Easy,
cpp,AUTOSAR,M10-3-3,Yes,Required,Automated,Implementation,A virtual function shall only be overridden by a pure virtual function if it is itself declared as pure virtual.,,VirtualFunctions,Easy,
cpp,AUTOSAR,M11-0-1,Yes,Required,Automated,Implementation,Member data in non-POD class types shall be private.,,Classes,Easy,
cpp,AUTOSAR,M12-1-1,Yes,Required,Automated,Implementation,An object's dynamic type shall not be used from the body of its constructor or destructor.,,Inheritance,Easy,
cpp,AUTOSAR,M14-5-3,Yes,Required,Automated,Implementation,A copy assignment operator shall be declared when there is a template assignment operator with a parameter that is a generic parameter.,,Templates,Easy,
cpp,AUTOSAR,M14-6-1,Yes,Required,Automated,Implementation,"In a class template with a dependent base, any name that may be found in that dependent base shall be referred to using a qualified-id or this->.",,Templates,Easy,
cpp,AUTOSAR,M15-0-3,Yes,Required,Automated,Implementation,Control shall not be transferred into a try or catch block using a goto or a switch statement.,,Exceptions1,Easy,
cpp,AUTOSAR,M15-1-1,Yes,Required,Automated,Implementation,The assignment-expression of a throw statement shall not itself cause an exception to be thrown.,,Exceptions1,Easy,
cpp,AUTOSAR,M15-1-2,Yes,Required,Automated,Implementation,NULL shall not be thrown explicitly.,,Exceptions1,Easy,
cpp,AUTOSAR,M15-1-3,Yes,Required,Automated,Implementation,An empty throw (throw;) shall only be used in the compound statement of a catch handler.,,Exceptions1,Easy,
cpp,AUTOSAR,M15-3-1,Yes,Required,Automated,Implementation,Exceptions shall be raised only after start-up and before termination.,,Exceptions2,Easy,
cpp,AUTOSAR,M15-3-3,Yes,Required,Automated,Implementation,Handlers of a function-try-block implementation of a class constructor or destructor shall not reference non-static members from this class or its bases.,ERR53-CPP,Exceptions2,Import,
cpp,AUTOSAR,M15-3-4,Yes,Required,Automated,Implementation,Each exception explicitly thrown in the code shall have a handler of a compatible type in all call paths that could lead to that point.,,Exceptions1,Medium,
cpp,AUTOSAR,M15-3-6,Yes,Required,Automated,Implementation,"Where multiple handlers are provided in a single try-catch statement or function-try-block for a derived class and some or all of its bases, the handlers shall be ordered most-derived to base class.",ERR54-CPP,Exceptions2,Import,
cpp,AUTOSAR,M15-3-7,Yes,Required,Automated,Implementation,"Where multiple handlers are provided in a single try-catch statement or function-try-block, any ellipsis (catch-all) handler shall occur last.",,Exceptions1,Easy,
cpp,AUTOSAR,M16-0-1,Yes,Required,Automated,Implementation,#include directives in a file shall only be preceded by other pre-processor directives or comments.,cpp/jpl-c/includes-first,Macros,Easy,
cpp,AUTOSAR,M16-0-2,Yes,Required,Automated,Implementation,Macros shall only be #define'd or #undef'd in the global namespace.,,Macros,Easy,
cpp,AUTOSAR,M16-0-5,Yes,Required,Automated,Implementation,Arguments to a function-like macro shall not contain tokens that look like pre-processing directives.,,Macros,Easy,
cpp,AUTOSAR,M16-0-6,Yes,Required,Automated,Implementation,"In the definition of a function-like macro, each instance of a parameter shall be enclosed in parentheses, unless it is used as the operand of # or ##.",,Macros,Easy,
cpp,AUTOSAR,M16-0-7,Yes,Required,Automated,Implementation,"Undefined macro identifiers shall not be used in #if or #elif pre-processor directives, except as operands to the defined operator.",,Macros,Hard,
cpp,AUTOSAR,M16-0-8,No,Required,Automated,Implementation,"If the # token appears as the first token on a line, then it shall be immediately followed by a pre-processing token.",,,,This is verified by the compiler in the cases where the token is not within an ifdef branch that's never taken
cpp,AUTOSAR,M16-1-1,Yes,Required,Automated,Implementation,The defined pre-processor operator shall only be used in one of the two standard forms.,,Macros,Easy,
cpp,AUTOSAR,M16-1-2,No,Required,Automated,Implementation,"All #else, #elif and #endif pre-processor directives shall reside in the same file as the #if or #ifdef directive to which they are related.",,,,Compilers already prohibit this case
cpp,AUTOSAR,M16-2-3,Yes,Required,Automated,Implementation,Include guards shall be provided.,cpp/missing-header-guard,Includes,Easy,
cpp,AUTOSAR,M16-3-1,Yes,Required,Automated,Implementation,There shall be at most one occurrence of the # or ## operators in a single macro definition.,,Macros,Easy,
cpp,AUTOSAR,M16-3-2,Yes,Advisory,Automated,Implementation,The # and ## operators should not be used.,,Macros,Easy,
cpp,AUTOSAR,M17-0-2,Yes,Required,Automated,Implementation,The names of standard library macros and objects shall not be reused.,,Naming,Medium,
cpp,AUTOSAR,M17-0-3,Yes,Required,Automated,Implementation,The names of standard library functions shall not be overridden.,,Naming,Medium,
cpp,AUTOSAR,M17-0-5,Yes,Required,Automated,Implementation,The setjmp macro and the longjmp function shall not be used.,ERR52-CPP,BannedFunctions,Import,
cpp,AUTOSAR,M18-0-3,Yes,Required,Automated,Implementation,"The library functions abort, exit, getenv and system from library <cstdlib> shall not be used.",,BannedFunctions,Easy,
cpp,AUTOSAR,M18-0-4,Yes,Required,Automated,Implementation,The time handling functions of library <ctime> shall not be used.,,BannedFunctions,Easy,
cpp,AUTOSAR,M18-0-5,Yes,Required,Automated,Implementation,The unbounded functions of library <cstring> shall not be used.,,BannedFunctions,Easy,
cpp,AUTOSAR,M18-2-1,Yes,Required,Automated,Implementation,The macro offsetof shall not be used.,,BannedFunctions,Easy,
cpp,AUTOSAR,M18-7-1,Yes,Required,Automated,Implementation,The signal handling facilities of <csignal> shall not be used.,,BannedLibraries,Easy,
cpp,AUTOSAR,M19-3-1,Yes,Required,Automated,Implementation,The error indicator errno shall not be used.,,BannedLibraries,Easy,
cpp,AUTOSAR,M2-10-1,Yes,Required,Automated,Architecture / Design / Implementation,Different identifiers shall be typographically unambiguous.,,Naming,Easy,
cpp,AUTOSAR,M2-13-2,Yes,Required,Automated,Architecture / Design / Implementation,Octal constants (other than zero) and octal escape sequences (other than '\0' ) shall not be used.,,Literals,Easy,
cpp,AUTOSAR,M2-13-3,Yes,Required,Automated,Architecture / Design / Implementation,A 'U' suffix shall be applied to all octal or hexadecimal integer literals of unsigned type.,,Literals,Easy,
cpp,AUTOSAR,M2-13-4,Yes,Required,Automated,Architecture / Design / Implementation,Literal suffixes shall be upper case.,,Literals,Easy,
cpp,AUTOSAR,M2-7-1,Yes,Required,Automated,Implementation,The character sequence /* shall not be used within a C-style comment.,,Comments,Easy,
cpp,AUTOSAR,M27-0-1,Yes,Required,Automated,Implementation,The stream input/output library <cstdio> shall not be used.,,BannedLibraries,Easy,
cpp,AUTOSAR,M3-1-2,Yes,Required,Automated,Implementation,Functions shall not be declared at block scope.,,Declarations,Easy,
cpp,AUTOSAR,M3-2-1,Yes,Required,Automated,Implementation,All declarations of an object or function shall have compatible types.,,Declarations,Easy,
cpp,AUTOSAR,M3-2-2,Yes,Required,Automated,Implementation,The One Definition Rule shall not be violated.,DCL60-CPP,Scope,Import,
cpp,AUTOSAR,M3-2-3,Yes,Required,Automated,Implementation,"A type, object or function that is used in multiple translation units shall be declared in one and only one file.",,Scope,Easy,
cpp,AUTOSAR,M3-2-4,Yes,Required,Automated,Implementation,An identifier with external linkage shall have exactly one definition.,,Scope,Easy,
cpp,AUTOSAR,M3-3-2,Yes,Required,Automated,Implementation,If a function has internal linkage then all re-declarations shall include the static storage class specifier.,,Scope,Easy,
cpp,AUTOSAR,M3-4-1,Yes,Required,Automated,Implementation,An identifier declared to be an object or type shall be defined in a block that minimizes its visibility.,,Scope,Easy,
cpp,AUTOSAR,M3-9-1,Yes,Required,Automated,Implementation,"The types used for an object, a function return type, or a function parameter shall be token-for-token identical in all declarations and re-declarations.",M8-4-2,Declarations,Easy,
cpp,AUTOSAR,M3-9-3,Yes,Required,Automated,Implementation,The underlying bit representations of floating-point values shall not be used.,,Representation,Easy,
cpp,AUTOSAR,M4-10-1,Yes,Required,Automated,Implementation,NULL shall not be used as an integer value.,,Literals,Easy,
cpp,AUTOSAR,M4-10-2,Yes,Required,Automated,Implementation,Literal zero (0) shall not be used as the null-pointer-constant.,A4-10-1,Literals,Easy,
cpp,AUTOSAR,M4-5-1,Yes,Required,Automated,Implementation,"Expressions with type bool shall not be used as operands to built-in operators other than the assignment operator =, the logical operators",,Expressions,Easy,
cpp,AUTOSAR,M4-5-3,Yes,Required,Automated,Implementation,"Expressions with type (plain) char and wchar_t shall not be used as operands to built-in operators other than the assignment operator =, the equality operators == and ! =, and the unary & operator.",,Expressions,Easy,
cpp,AUTOSAR,M5-0-10,Yes,Required,Automated,Implementation,"If the bitwise operators ~and << are applied to an operand with an underlying type of unsigned char or unsigned short, the result shall be immediately cast to the underlying type of the operand.",,Operators,Easy,
cpp,AUTOSAR,M5-0-11,Yes,Required,Automated,Implementation,The plain char type shall only be used for the storage and use of character values.,CMISRA-6-01,Strings,Easy,
cpp,AUTOSAR,M5-0-12,Yes,Required,Automated,Implementation,Signed char and unsigned char type shall only be used for the storage and use of numeric values.,CMISRA-6-02,Strings,Easy,
cpp,AUTOSAR,M5-0-14,Yes,Required,Automated,Implementation,The first operand of a conditional-operator shall have type bool.,,Expressions,Easy,
cpp,AUTOSAR,M5-0-15,Yes,Required,Automated,Implementation,Array indexing shall be the only form of pointer arithmetic.,cpp/jsf/av-rule-215?,Pointers,Easy,
cpp,AUTOSAR,M5-0-16,Yes,Required,Automated,Implementation,A pointer operand and any pointer resulting from pointer arithmetic using that operand shall both address elements of the same array.,CTR50-CPP,Pointers,Hard,
cpp,AUTOSAR,M5-0-17,Yes,Required,Automated,Implementation,Subtraction between pointers shall only be applied to pointers that address elements of the same array.,,Pointers,Easy,
cpp,AUTOSAR,M5-0-18,Yes,Required,Automated,Implementation,">, >=, <, <= shall not be applied to objects of pointer type, except where they point to the same array.",,Pointers,Easy,
cpp,AUTOSAR,M5-0-2,Yes,Advisory,Partially Automated,Implementation,Limited dependence should be placed on C++ operator precedence rules in expressions.,,OrderOfEvaluation,Easy,
cpp,AUTOSAR,M5-0-20,Yes,Required,Automated,Implementation,Non-constant operands to a binary bitwise operator shall have the same underlying type.,,Expressions,Easy,
cpp,AUTOSAR,M5-0-21,Yes,Required,Automated,Implementation,Bitwise operators shall only be applied to operands of unsigned underlying type.,,Expressions,Easy,
cpp,AUTOSAR,M5-0-3,Yes,Required,Automated,Implementation,A cvalue expression shall not be implicitly converted to a different underlying type.,,Expressions,Easy,
cpp,AUTOSAR,M5-0-4,Yes,Required,Automated,Implementation,An implicit integral conversion shall not change the signedness of the underlying type.,,IntegerConversion,Easy,
cpp,AUTOSAR,M5-0-5,Yes,Required,Automated,Implementation,There shall be no implicit floating-integral conversions.,,IntegerConversion,Easy,
cpp,AUTOSAR,M5-0-6,Yes,Required,Automated,Implementation,An implicit integral or floating-point conversion shall not reduce the size of the underlying type.,,IntegerConversion,Easy,
cpp,AUTOSAR,M5-0-7,Yes,Required,Automated,Implementation,There shall be no explicit floating-integral conversions of a cvalue expression.,,IntegerConversion,Easy,
cpp,AUTOSAR,M5-0-8,Yes,Required,Automated,Implementation,An explicit integral or floating-point conversion shall not increase the size of the underlying type of a cvalue expression.,,IntegerConversion,Easy,
cpp,AUTOSAR,M5-0-9,Yes,Required,Automated,Implementation,An explicit integral conversion shall not change the signedness of the underlying type of a cvalue expression.,,IntegerConversion,Easy,
cpp,AUTOSAR,M5-14-1,Yes,Required,Automated,Implementation,"The right hand operand of a logical &&, || operators shall not contain side effects.",,SideEffects1,Medium,
cpp,AUTOSAR,M5-17-1,Yes,Required,Non-Automated,Implementation,The semantic equivalence between a binary operator and its assignment operator form shall be preserved.,,OperatorInvariants,Audit,Produce a list of binary and assigment operator pairs.
cpp,AUTOSAR,M5-18-1,Yes,Required,Automated,Implementation,The comma operator shall not be used.,cpp/jsf/av-rule-168,BannedSyntax,Easy,
cpp,AUTOSAR,M5-19-1,Yes,Required,Automated,Implementation,Evaluation of constant unsigned integer expressions shall not lead to wrap-around.,,Expressions,Medium,
cpp,AUTOSAR,M5-2-10,Yes,Required,Automated,Implementation,The increment (++) and decrement (--) operators shall not be mixed with other operators in an expression.,,OrderOfEvaluation,Easy,
cpp,AUTOSAR,M5-2-11,Yes,Required,Automated,Implementation,"The comma operator, && operator and the || operator shall not be overloaded.",,Operators,Easy,
cpp,AUTOSAR,M5-2-12,Yes,Required,Automated,Implementation,An identifier with array type passed as a function argument shall not decay to a pointer.,,Pointers,Easy,
cpp,AUTOSAR,M5-2-2,Yes,Required,Automated,Implementation,A pointer to a virtual base class shall only be cast to a pointer to a derived class by means of dynamic_cast.,,Pointers,Easy,
cpp,AUTOSAR,M5-2-3,Yes,Advisory,Automated,Implementation,Casts from a base class to a derived class should not be performed on polymorphic types.,,Inheritance,Easy,
cpp,AUTOSAR,M5-2-6,Yes,Required,Automated,Implementation,"A cast shall not convert a pointer to a function to any other pointer type, including a pointer to function type.",,Pointers,Easy,
cpp,AUTOSAR,M5-2-8,Yes,Required,Automated,Implementation,An object with integer type or pointer to void type shall not be converted to an object with pointer type.,,Pointers,Easy,
cpp,AUTOSAR,M5-2-9,Yes,Required,Automated,Implementation,A cast shall not convert a pointer type to an integral type.,,Pointers,Easy,
cpp,AUTOSAR,M5-3-1,Yes,Required,Automated,Implementation,"Each operand of the ! operator, the logical && or the logical || operators shall have type bool.",,Operators,Easy,
cpp,AUTOSAR,M5-3-2,Yes,Required,Automated,Implementation,The unary minus operator shall not be applied to an expression whose underlying type is unsigned.,,Operators,Easy,
cpp,AUTOSAR,M5-3-3,Yes,Required,Automated,Implementation,The unary & operator shall not be overloaded.,,Operators,Easy,
cpp,AUTOSAR,M5-3-4,Yes,Required,Automated,Implementation,Evaluation of the operand to the sizeof operator shall not contain side effects.,cpp/sizeof-side-effect,SideEffects1,Easy,
cpp,AUTOSAR,M5-8-1,Yes,Required,Partially Automated,Implementation,The right hand operand of a shift operator shall lie between zero and one less than the width in bits of the underlying type of the left hand operand.,,Expressions,Medium,
cpp,AUTOSAR,M6-2-1,Yes,Required,Automated,Implementation,Assignment operators shall not be used in sub-expressions.,,OrderOfEvaluation,Easy,
cpp,AUTOSAR,M6-2-2,Yes,Required,Partially Automated,Implementation,Floating-point expressions shall not be directly or indirectly tested for equality or inequality.,,Expressions,Easy,
cpp,AUTOSAR,M6-2-3,Yes,Required,Automated,Implementation,"Before preprocessing, a null statement shall only occur on a line by itself; it may be followed by a comment, provided that the first character following the null statement is a white-space character.",,Comments,Easy,
cpp,AUTOSAR,M6-3-1,Yes,Required,Automated,Implementation,"The statement forming the body of a switch, while, do ... while or for statement shall be a compound statement.",,Conditionals,Easy,
cpp,AUTOSAR,M6-4-1,Yes,Required,Automated,Implementation,"An if ( condition ) construct shall be followed by a compound statement. The else keyword shall be followed by either a compound statement, or another if statement.",,Conditionals,Easy,
cpp,AUTOSAR,M6-4-2,Yes,Required,Automated,Implementation,All if ... else if constructs shall be terminated with an else clause.,,Conditionals,Easy,
cpp,AUTOSAR,M6-4-3,Yes,Required,Automated,Implementation,A switch statement shall be a well-formed switch statement.,,Conditionals,Easy,
cpp,AUTOSAR,M6-4-4,Yes,Required,Automated,Implementation,A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement.,,Conditionals,Easy,
cpp,AUTOSAR,M6-4-5,Yes,Required,Automated,Implementation,An unconditional throw or break statement shall terminate every non-empty switch-clause.,cpp/jsf/av-rule-193,Conditionals,Easy,
cpp,AUTOSAR,M6-4-6,Yes,Required,Automated,Implementation,The final clause of a switch statement shall be the default-clause.,,Conditionals,Easy,
cpp,AUTOSAR,M6-4-7,Yes,Required,Automated,Implementation,The condition of a switch statement shall not have bool type.,,Conditionals,Easy,
cpp,AUTOSAR,M6-5-2,Yes,Required,Automated,Implementation,"If loop-counter is not modified by or ++, then, within condition, the loop-counter shall only be used as an operand to <=, <, > or >=.",,Loops,Easy,
cpp,AUTOSAR,M6-5-3,Yes,Required,Automated,Implementation,The loop-counter shall not be modified within condition or statement.,,Loops,Easy,
cpp,AUTOSAR,M6-5-4,Yes,Required,Automated,Implementation,"The loop-counter shall be modified by one of: , ++, = n, or + = n; where n remains constant for the duration of the loop.",,Loops,Easy,
cpp,AUTOSAR,M6-5-5,Yes,Required,Automated,Implementation,A loop-control-variable other than the loop-counter shall not be modified within condition or expression.,,Loops,Easy,
cpp,AUTOSAR,M6-5-6,Yes,Required,Automated,Implementation,A loop-control-variable other than the loop-counter which is modified in statement shall have type bool.,,Loops,Easy,
cpp,AUTOSAR,M6-6-1,Yes,Required,Automated,Implementation,"Any label referenced by a goto statement shall be declared in the same block, or in a block enclosing the goto statement.",,Conditionals,Easy,
cpp,AUTOSAR,M6-6-2,Yes,Required,Automated,Implementation,The goto statement shall jump to a label declared later in the same function body.,,Conditionals,Easy,
cpp,AUTOSAR,M6-6-3,Yes,Required,Automated,Implementation,The continue statement shall only be used within a well-formed for loop.,,Conditionals,Easy,
cpp,AUTOSAR,M7-1-2,Yes,Required,Automated,Implementation,A pointer or reference parameter in a function shall be declared as pointer to const or reference to const if the corresponding object is not modified.,,Const,Hard,
cpp,AUTOSAR,M7-3-1,Yes,Required,Automated,Implementation,"The global namespace shall only contain main, namespace declarations and extern ""C"" declarations.",,Scope,Easy,
cpp,AUTOSAR,M7-3-2,Yes,Required,Automated,Implementation,The identifier main shall not be used for a function other than the global function main.,,Naming,Easy,
cpp,AUTOSAR,M7-3-3,Yes,Required,Automated,Implementation,There shall be no unnamed namespaces in header files.,,Naming,Easy,
cpp,AUTOSAR,M7-3-4,Yes,Required,Automated,Implementation,Using-directives shall not be used.,,BannedSyntax,Easy,
cpp,AUTOSAR,M7-3-6,Yes,Required,Automated,Implementation,Using-directives and using-declarations (excluding class scope or function scope using-declarations) shall not be used in header files.,,BannedSyntax,Easy,
cpp,AUTOSAR,M7-4-1,Yes,Required,Non-Automated,Implementation,All usage of assembler shall be documented.,,BannedLibraries,Audit,List all the places where assembler is used.
cpp,AUTOSAR,M7-4-2,Yes,Required,Automated,Implementation,Assembler instructions shall only be introduced using the asm declaration.,A7-4-1,Functions,Easy,
cpp,AUTOSAR,M7-4-3,Yes,Required,Automated,Implementation,Assembly language shall be encapsulated and isolated.,,Functions,Easy,
cpp,AUTOSAR,M7-5-1,Yes,Required,Non-Automated,Implementation,"A function shall not return a reference or a pointer to an automatic variable (including parameters), defined within the function.",,Functions,Medium,Similar to M7-5-2.
cpp,AUTOSAR,M7-5-2,Yes,Required,Non-Automated,Implementation,The address of an object with automatic storage shall not be assigned to another object that may persist after the first object has ceased to exist.,EXP54-CPP,Freed,Hard,Identify address of expressions for automatic storage objects which flow (via data flow) to some expression which escapes.
cpp,AUTOSAR,M8-0-1,Yes,Required,Automated,Implementation,An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively.,,Initialization,Easy,
cpp,AUTOSAR,M8-3-1,Yes,Required,Automated,Implementation,"Parameters in an overriding virtual function shall either use the same default arguments as the function they override, or else shall not specify any default arguments.",,VirtualFunctions,Easy,
cpp,AUTOSAR,M8-4-2,Yes,Required,Automated,Implementation,The identifiers used for the parameters in a re-declaration of a function shall be identical to those in the declaration.,M3-9-1,Naming,Easy,
cpp,AUTOSAR,M8-4-4,Yes,Required,Automated,Implementation,A function identifier shall either be used to call the function or it shall be preceded by &.,,Functions,Easy,
cpp,AUTOSAR,M8-5-2,Yes,Required,Automated,Implementation,Braces shall be used to indicate and match the structure in the non-zero initialization of arrays and structures.,,Initialization,Easy,
cpp,AUTOSAR,M9-3-1,Yes,Required,Automated,Implementation,Const member functions shall not return non-const pointers or references to class-data.,,Const,Easy,
cpp,AUTOSAR,M9-3-3,Yes,Required,Automated,Implementation,"If a member function can be made static then it shall be made static, otherwise if it can be made const then it shall be made const.",,Const,Easy,
cpp,AUTOSAR,M9-6-1,No,Required,Non-Automated,Implementation,"When the absolute positioning of bits representing a bit-field is required, then the behavior and packing of bit-fields shall be documented.",,,,Documentation not covered by queries
cpp,AUTOSAR,M9-6-4,Yes,Required,Automated,Implementation,Named bit-fields with signed integer type shall have a length of more than one bit.,,Representation,Easy,
cpp,CERT-C++,CON50-CPP,Yes,Rule,,,Do not destroy a mutex while it is locked,,Concurrency,Hard,
cpp,CERT-C++,CON51-CPP,Yes,Rule,,,Ensure actively held locks are released on exceptional conditions,,Concurrency,Easy,
cpp,CERT-C++,CON52-CPP,Yes,Rule,,,Prevent data races when accessing bit-fields from multiple threads,,Concurrency,Medium,
cpp,CERT-C++,CON53-CPP,Yes,Rule,,,Avoid deadlock by locking in a predefined order,,Concurrency,Very Hard,
cpp,CERT-C++,CON54-CPP,Yes,Rule,,,Wrap functions that can spuriously wake up in a loop,,Concurrency,Medium,
cpp,CERT-C++,CON55-CPP,Yes,Rule,,,Preserve thread safety and liveness when using condition variables,,Concurrency,Hard,
cpp,CERT-C++,CON56-CPP,Yes,Rule,,,Do not speculatively lock a non-recursive mutex that is already owned by the calling thread,cpp/twice-locked???,Concurrency,Hard,
cpp,CERT-C++,CTR50-CPP,Yes,Rule,,,Guarantee that container indices and iterators are within the valid range,,OutOfBounds,Very Hard,
cpp,CERT-C++,CTR51-CPP,Yes,Rule,,,"Use valid references, pointers, and iterators to reference elements of a container",,Iterators,Hard,
cpp,CERT-C++,CTR52-CPP,Yes,Rule,,,Guarantee that library functions do not overflow,,OutOfBounds,Very Hard,
cpp,CERT-C++,CTR53-CPP,Yes,Rule,,,Use valid iterator ranges,,Iterators,Hard,
cpp,CERT-C++,CTR54-CPP,Yes,Rule,,,Do not subtract iterators that do not refer to the same container,,Iterators,Hard,
cpp,CERT-C++,CTR55-CPP,Yes,Rule,,,Do not use an additive operator on an iterator if the result would overflow,,Iterators,Hard,
cpp,CERT-C++,CTR56-CPP,Yes,Rule,,,Do not use pointer arithmetic on polymorphic objects,,Pointers,Easy,
cpp,CERT-C++,CTR57-CPP,Yes,Rule,,,Provide a valid ordering predicate,,Invariants,Medium,
cpp,CERT-C++,CTR58-CPP,Yes,Rule,,,Predicate function objects should not be mutable,,SideEffects2,Medium,
cpp,CERT-C++,DCL50-CPP,Yes,Rule,,,Do not define a C-style variadic function,,BannedSyntax,Easy,
cpp,CERT-C++,DCL51-CPP,Yes,Rule,,,Do not declare or define a reserved identifier,,Naming,Medium,
cpp,CERT-C++,DCL52-CPP,No,Rule,,,Never qualify a reference type with const or volatile,,,,"This is compiler checked - clang reports an error. The extractor accepts it, but doesn't include the cv information."
cpp,CERT-C++,DCL53-CPP,Yes,Rule,,,Do not write syntactically ambiguous declarations,,Scope,Medium,
cpp,CERT-C++,DCL54-CPP,Yes,Rule,,,Overload allocation and deallocation functions as a pair in the same scope,,Scope,Easy,
cpp,CERT-C++,DCL55-CPP,Yes,Rule,,,Avoid information leakage when passing a class object across a trust boundary,,Uninitialized,Very Hard,
cpp,CERT-C++,DCL56-CPP,Yes,Rule,,,Avoid cycles during initialization of static objects,,Initialization,Easy,
cpp,CERT-C++,DCL57-CPP,Yes,Rule,,,Do not let exceptions escape from destructors or deallocation functions,A15-5-1,Exceptions2,Easy,
cpp,CERT-C++,DCL58-CPP,Yes,Rule,,,Do not modify the standard namespaces,,Scope,Easy,
cpp,CERT-C++,DCL59-CPP,Yes,Rule,,,Do not define an unnamed namespace in a header file,,Scope,Easy,
cpp,CERT-C++,DCL60-CPP,Yes,Rule,,,Obey the one-definition rule,M3-2-2,Scope,Easy,
cpp,CERT-C++,ERR50-CPP,Yes,Rule,,,Do not abruptly terminate the program,,Exceptions1,Medium,
cpp,CERT-C++,ERR51-CPP,Yes,Rule,,,Handle all exceptions,,Exceptions1,Easy,
cpp,CERT-C++,ERR52-CPP,Yes,Rule,,,Do not use setjmp() or longjmp(),cpp/jsf/av-rule-20,BannedFunctions,Easy,
cpp,CERT-C++,ERR53-CPP,Yes,Rule,,,Do not reference base classes or class data members in a constructor or destructor function-try-block handler,,Exceptions1,Easy,
cpp,CERT-C++,ERR54-CPP,Yes,Rule,,,Catch handlers should order their parameter types from most derived to least derived,,Exceptions2,Easy,
cpp,CERT-C++,ERR55-CPP,Yes,Rule,,,Honor exception specifications,A15-4-2,Exceptions1,Medium,
cpp,CERT-C++,ERR56-CPP,Yes,Rule,,,Guarantee exception safety,,ExceptionSafety,Hard,
cpp,CERT-C++,ERR57-CPP,Yes,Rule,,,Do not leak resources when handling exceptions,,ExceptionSafety,Hard,
cpp,CERT-C++,ERR58-CPP,Yes,Rule,,,Handle all exceptions thrown before main() begins executing,,Exceptions1,Easy,
cpp,CERT-C++,ERR59-CPP,Yes,Rule,,,Do not throw an exception across execution boundaries,,TrustBoundaries,Hard,
cpp,CERT-C++,ERR60-CPP,Yes,Rule,,,Exception objects must be nothrow copy constructible,,Exceptions1,Medium,
cpp,CERT-C++,ERR61-CPP,Yes,Rule,,,Catch exceptions by lvalue reference,,Exceptions1,Easy,
cpp,CERT-C++,ERR62-CPP,Yes,Rule,,,Detect errors when converting a string to a number,A18-0-2,TypeRanges,Medium,
cpp,CERT-C++,EXP50-CPP,Yes,Rule,,,Do not depend on the order of evaluation for side effects,,SideEffects1,Hard,
cpp,CERT-C++,EXP51-CPP,Yes,Rule,,,Do not delete an array through a pointer of the incorrect type,,Freed,Hard,
cpp,CERT-C++,EXP52-CPP,Yes,Rule,,,Do not rely on side effects in unevaluated operands,,SideEffects1,Medium,
cpp,CERT-C++,EXP53-CPP,Yes,Rule,,,Do not read uninitialized memory,cpp/not-initialised???,Uninitialized,Very Hard,
cpp,CERT-C++,EXP54-CPP,Yes,Rule,,,Do not access an object outside of its lifetime,,Freed,Very Hard,
cpp,CERT-C++,EXP55-CPP,Yes,Rule,,,Do not access a cv-qualified object through a cv-unqualified type,,Const,Easy,
cpp,CERT-C++,EXP56-CPP,Yes,Rule,,,Do not call a function with a mismatched language linkage,,Functions,Easy,
cpp,CERT-C++,EXP57-CPP,Yes,Rule,,,Do not cast or delete pointers to incomplete classes,,Pointers,Medium,
cpp,CERT-C++,EXP58-CPP,Yes,Rule,,,Pass an object of the correct type to va_start,,Expressions,Medium,
cpp,CERT-C++,EXP59-CPP,Yes,Rule,,,Use offsetof() on valid types and members,,Classes,Medium,
cpp,CERT-C++,EXP60-CPP,Yes,Rule,,,Do not pass a nonstandard-layout type object across execution boundaries,,TrustBoundaries,Hard,
cpp,CERT-C++,EXP61-CPP,Yes,Rule,,,A lambda object must not outlive any of its reference captured objects,EXP54-CPP,Lambdas,Medium,
cpp,CERT-C++,EXP62-CPP,Yes,Rule,,,Do not access the bits of an object representation that are not part of the object's value representation,,Representation,Easy,
cpp,CERT-C++,EXP63-CPP,Yes,Rule,,,Do not rely on the value of a moved-from object,,MoveForward,Hard,
cpp,CERT-C++,FIO50-CPP,Yes,Rule,,,Do not alternately input and output from a file stream without an intervening positioning call,,IO,Medium,
cpp,CERT-C++,FIO51-CPP,Yes,Rule,,,Close files when they are no longer needed,,IO,Medium,
cpp,CERT-C++,INT50-CPP,Yes,Rule,,,Do not cast to an out-of-range enumeration value,A7-2-1,TypeRanges,Hard,
cpp,CERT-C++,MEM50-CPP,Yes,Rule,,,Do not access freed memory,cpp/use-after-free,Freed,Very Hard,
cpp,CERT-C++,MEM51-CPP,Yes,Rule,,,Properly deallocate dynamically allocated resources,cpp/memory-never-freed???,Allocations,Very Hard,
cpp,CERT-C++,MEM52-CPP,Yes,Rule,,,Detect and handle memory allocation errors,,Allocations,Medium,
cpp,CERT-C++,MEM53-CPP,Yes,Rule,,,Explicitly construct and destruct objects when manually managing object lifetime,,Allocations,Medium,
cpp,CERT-C++,MEM54-CPP,Yes,Rule,,,Provide placement new with properly aligned pointers to sufficient storage capacity,,Allocations,Hard,
cpp,CERT-C++,MEM55-CPP,Yes,Rule,,,Honor replacement dynamic storage management requirements,,Allocations,Hard,
cpp,CERT-C++,MEM56-CPP,Yes,Rule,,,Do not store an already-owned pointer value in an unrelated smart pointer,,SmartPointers2,Very Hard,
cpp,CERT-C++,MEM57-CPP,Yes,Rule,,,Avoid using default operator new for over-aligned types,,Allocations,Easy,
cpp,CERT-C++,MSC50-CPP,Yes,Rule,,,Do not use std::rand() for generating pseudorandom numbers,,BannedFunctions,Easy,
cpp,CERT-C++,MSC51-CPP,Yes,Rule,,,Ensure your random number generator is properly seeded,,Initialization,Medium,
cpp,CERT-C++,MSC52-CPP,Yes,Rule,,,Value-returning functions must return a value from all exit paths,cpp/missing-return,Functions,Easy,
cpp,CERT-C++,MSC53-CPP,Yes,Rule,,,Do not return from a function declared [[noreturn]],,Functions,Easy,
cpp,CERT-C++,MSC54-CPP,Yes,Rule,,,A signal handler must be a plain old function,,Invariants,Medium,
cpp,CERT-C++,OOP50-CPP,Yes,Rule,,,Do not invoke virtual functions from constructors or destructors,,Inheritance,Easy,
cpp,CERT-C++,OOP51-CPP,Yes,Rule,,,Do not slice derived objects,,Inheritance,Medium,
cpp,CERT-C++,OOP52-CPP,Yes,Rule,,,Do not delete a polymorphic object without a virtual destructor,A12-4-1,Inheritance,Easy,
cpp,CERT-C++,OOP53-CPP,Yes,Rule,,,Write constructor member initializers in the canonical order,,Initialization,Easy,
cpp,CERT-C++,OOP54-CPP,Yes,Rule,,,Gracefully handle self-copy assignment,"cpp/jsf/av-rule-81?, cpp/self-assignment-check?",OperatorInvariants,Hard,
cpp,CERT-C++,OOP55-CPP,Yes,Rule,,,Do not use pointer-to-member operators to access nonexistent members,,Pointers,Medium,
cpp,CERT-C++,OOP56-CPP,Yes,Rule,,,Honor replacement handler requirements,,Invariants,Easy,
cpp,CERT-C++,OOP57-CPP,Yes,Rule,,,Prefer special member functions and overloaded operators to C Standard Library functions,EXP62-CPP,BannedFunctions,Easy,
cpp,CERT-C++,OOP58-CPP,Yes,Rule,,,Copy operations must not mutate the source object,,OperatorInvariants,Medium,
cpp,CERT-C++,STR50-CPP,Yes,Rule,,,Guarantee that storage for strings has sufficient space for character data and the null terminator,,Strings,Very Hard,
cpp,CERT-C++,STR51-CPP,Yes,Rule,,,Do not attempt to create a std::string from a null pointer,,Null,Hard,
cpp,CERT-C++,STR52-CPP,Yes,Rule,,,"Use valid references, pointers, and iterators to reference elements of a basic_string",,Iterators,Hard,
cpp,CERT-C++,STR53-CPP,Yes,Rule,,,Range check element access,,OutOfBounds,Hard,
c,CERT-C,ARR30-C,Yes,Rule,,,Do not form or use out-of-bounds pointers or array subscripts,,OutOfBounds,Hard,
c,CERT-C,ARR32-C,Yes,Rule,,,Ensure size arguments for variable length arrays are in a valid range,,InvalidMemory2,Medium,
c,CERT-C,ARR36-C,Yes,Rule,,,Do not subtract or compare two pointers that do not refer to the same array,,Memory2,Medium,
c,CERT-C,ARR37-C,Yes,Rule,,,Do not add or subtract an integer to a pointer to a non-array object,,InvalidMemory2,Medium,
c,CERT-C,ARR38-C,Yes,Rule,,,Guarantee that library functions do not form invalid pointers,,OutOfBounds,Very Hard,
c,CERT-C,ARR39-C,Yes,Rule,,,Do not add or subtract a scaled integer to a pointer,,Pointers2,Medium,
c,CERT-C,CON30-C,Yes,Rule,,,Clean up thread-specific storage,,Concurrency4,Very Hard,
c,CERT-C,CON31-C,Yes,Rule,,,Do not destroy a mutex while it is locked,CON50-CPP,Concurrency3,Very Hard,
c,CERT-C,CON32-C,Yes,Rule,,,Prevent data races when accessing bit-fields from multiple threads,,Concurrency1,Easy,
c,CERT-C,CON33-C,Yes,Rule,,,Avoid race conditions when using library functions,,Concurrency1,Easy,
c,CERT-C,CON34-C,Yes,Rule,,,Declare objects shared between threads with appropriate storage durations,,Concurrency4,Hard,
c,CERT-C,CON35-C,Yes,Rule,,,Avoid deadlock by locking in a predefined order,CON53-CPP,Concurrency2,Medium,
c,CERT-C,CON36-C,Yes,Rule,,,Wrap functions that can spuriously wake up in a loop,CON54-CPP,Concurrency2,Medium,
c,CERT-C,CON37-C,Yes,Rule,,,Do not call signal() in a multithreaded program,,Concurrency1,Easy,
c,CERT-C,CON38-C,Yes,Rule,,,Preserve thread safety and liveness when using condition variables,CON55-CPP,Concurrency3,Medium,
c,CERT-C,CON39-C,Yes,Rule,,,Do not join or detach a thread that was previously joined or detached,,Concurrency5,Hard,
c,CERT-C,CON40-C,Yes,Rule,,,Do not refer to an atomic variable twice in an expression,,Concurrency5,Medium,
c,CERT-C,CON41-C,Yes,Rule,,,Wrap functions that can fail spuriously in a loop,CON53-CPP,Concurrency3,Medium,
c,CERT-C,CON43-C,OutOfScope,Rule,,,Do not allow data races in multithreaded code,,,,
c,CERT-C,DCL30-C,Yes,Rule,,,Declare objects with appropriate storage durations,,Declarations8,Hard,
c,CERT-C,DCL31-C,Yes,Rule,,,Declare identifiers before using them,,Declarations1,Medium,
c,CERT-C,DCL36-C,No,Rule,,,Do not declare an identifier with conflicting linkage classifications,,,,Compiler enforced in all supported compilers
c,CERT-C,DCL37-C,Yes,Rule,,,Do not declare or define a reserved identifier,,Declarations1,Easy,
c,CERT-C,DCL38-C,Yes,Rule,,,Use the correct syntax when declaring a flexible array member,,Declarations2,Easy,
c,CERT-C,DCL39-C,Yes,Rule,,,Avoid information leakage when passing a structure across a trust boundary,,Declarations7,Hard,
c,CERT-C,DCL40-C,Yes,Rule,,,Do not create incompatible declarations of the same function or object,,Declarations2,Hard,
c,CERT-C,DCL41-C,Yes,Rule,,,Do not declare variables inside a switch statement before the first case label,,Declarations2,Medium,
c,CERT-C,ENV30-C,Yes,Rule,,,Do not modify the object referenced by the return value of certain functions,RULE-21-19,Contracts1,Medium,
c,CERT-C,ENV31-C,Yes,Rule,,,Do not rely on an environment pointer following an operation that may invalidate it,RULE-21-20,Contracts1,Hard,
c,CERT-C,ENV32-C,Yes,Rule,,,All exit handlers must return normally,,Contracts2,Medium,
c,CERT-C,ENV33-C,Yes,Rule,,,Do not call system(),"RULE-21-21, M18-0-3",Banned,Easy,
c,CERT-C,ENV34-C,Yes,Rule,,,Do not store pointers returned by certain functions,RULE-21-20,Contracts2,Medium,
c,CERT-C,ERR30-C,Yes,Rule,,,"Take care when reading errno",M19-3-1,Contracts4,Hard,
c,CERT-C,ERR32-C,Yes,Rule,,,Do not rely on indeterminate values of errno,,Contracts5,Hard,
c,CERT-C,ERR33-C,Yes,Rule,,,Detect and handle standard library errors,MEM52-CPP,Contracts5,Hard,
c,CERT-C,ERR34-C,OutOfScope,Rule,,,Detect errors when converting a string to a number,,,,
c,CERT-C,EXP30-C,Yes,Rule,,,Do not depend on the order of evaluation for side effects,EXP50-CPP,SideEffects1,Easy,
c,CERT-C,EXP32-C,Yes,Rule,,,Do not access a volatile object through a nonvolatile reference,,Pointers3,Easy,
c,CERT-C,EXP33-C,Yes,Rule,,,Do not read uninitialized memory,EXP53-CPP,InvalidMemory1,Import,
c,CERT-C,EXP34-C,Yes,Rule,,,Do not dereference null pointers,A5-3-2,InvalidMemory1,Import,
c,CERT-C,EXP35-C,Yes,Rule,,,Do not modify objects with temporary lifetime,,InvalidMemory2,Hard,
c,CERT-C,EXP36-C,Yes,Rule,,,Do not cast pointers into more strictly aligned pointer types,,Pointers3,Medium,
c,CERT-C,EXP37-C,Yes,Rule,,,Call functions with the correct number and type of arguments,,Expressions,Easy,
c,CERT-C,EXP39-C,Yes,Rule,,,Do not access a variable through a pointer of an incompatible type,,Pointers3,Medium,
c,CERT-C,EXP40-C,Yes,Rule,,,Do not modify constant objects,,Contracts6,Hard,
c,CERT-C,EXP42-C,Yes,Rule,,,Do not compare padding data,,Memory2,Medium,
c,CERT-C,EXP43-C,Yes,Rule,,,Avoid undefined behavior when using restrict-qualified pointers,,Pointers3,Medium,
c,CERT-C,EXP44-C,Yes,Rule,,,"Do not rely on side effects in operands to sizeof, _Alignof, or _Generic",M5-3-4,SideEffects1,Medium,
c,CERT-C,EXP45-C,Yes,Rule,,,Do not perform assignments in selection statements,M6-2-1,SideEffects1,Medium,
c,CERT-C,EXP46-C,Yes,Rule,,,Do not use a bitwise operator with a Boolean-like operand,,Expressions,Easy,
c,CERT-C,EXP47-C,OutOfScope,Rule,,,Do not call va_arg with an argument of the incorrect type,,,,
c,CERT-C,FIO30-C,Yes,Rule,,,Exclude user input from format strings,A27-0-1,IO1,Import,
c,CERT-C,FIO32-C,Yes,Rule,,,Do not perform operations on devices that are only appropriate for files,,IO3,Medium,
c,CERT-C,FIO34-C,Yes,Rule,,,Distinguish between characters read from a file and EOF or WEOF,,IO1,Hard,
c,CERT-C,FIO37-C,Yes,Rule,,,Do not assume that fgets() or fgetws() returns a nonempty string when successful,,IO3,Medium,
c,CERT-C,FIO38-C,Yes,Rule,,,Do not copy a FILE object,,IO2,Medium,
c,CERT-C,FIO39-C,Yes,Rule,,,Do not alternately input and output from a stream without an intervening flush or positioning call,FIO50-CPP A27-0-3,IO1,Medium,
c,CERT-C,FIO40-C,Yes,Rule,,,Reset strings on fgets() or fgetws() failure,,IO2,Medium,
c,CERT-C,FIO41-C,Yes,Rule,,,"Do not call getc(), putc(), getwc(), or putwc() with a stream argument that has side effects",,IO2,Medium,
c,CERT-C,FIO42-C,Yes,Rule,,,Close files when they are no longer needed,FIO51-CPP,IO1,Medium,
c,CERT-C,FIO44-C,Yes,Rule,,,Only use values for fsetpos() that are returned from fgetpos(),,IO2,Medium,
c,CERT-C,FIO45-C,Yes,Rule,,,Avoid TOCTOU race conditions while accessing files,,IO4,Medium,
c,CERT-C,FIO46-C,Yes,Rule,,,Do not access a closed file,FIO51-CPP,IO1,Hard,
c,CERT-C,FIO47-C,Yes,Rule,,,Use valid format strings,,IO4,Hard,
c,CERT-C,FLP30-C,Yes,Rule,,,Do not use floating-point variables as loop counters,,Statements4,Easy,
c,CERT-C,FLP32-C,Yes,Rule,,,Prevent or detect domain and range errors in math functions,A0-4-4,FloatingTypes,Medium,
c,CERT-C,FLP34-C,Yes,Rule,,,Ensure that floating-point conversions are within range of the new type,,FloatingTypes,Medium,
c,CERT-C,FLP36-C,Yes,Rule,,,Preserve precision when converting integral values to floating-point type,,FloatingTypes,Medium,
c,CERT-C,FLP37-C,Yes,Rule,,,Do not use object representations to compare floating-point values,,FloatingTypes,Medium,
c,CERT-C,INT30-C,Yes,Rule,,,Ensure that unsigned integer operations do not wrap,A4-7-1,IntegerOverflow,Hard,
c,CERT-C,INT31-C,Yes,Rule,,,Ensure that integer conversions do not result in lost or misinterpreted data,A4-7-1,IntegerOverflow,Hard,
c,CERT-C,INT32-C,Yes,Rule,,,Ensure that operations on signed integers do not result in overflow,A4-7-1,IntegerOverflow,Hard,
c,CERT-C,INT33-C,Yes,Rule,,,Ensure that division and remainder operations do not result in divide-by-zero errors,,IntegerOverflow,Hard,
c,CERT-C,INT34-C,Yes,Rule,,,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,M5-8-1,Types1,Import,
c,CERT-C,INT35-C,Yes,Rule,,,Use correct integer precisions,,IntegerOverflow,Hard,
c,CERT-C,INT36-C,Yes,Rule,,,Converting a pointer to integer or integer to pointer,M5-2-9,Types1,Easy,
c,CERT-C,MEM30-C,Yes,Rule,,,Do not access freed memory,MEM50-CPP,InvalidMemory1,Import,
c,CERT-C,MEM31-C,Yes,Rule,,,Free dynamically allocated memory when no longer needed,,Memory2,Very Hard,
c,CERT-C,MEM33-C,Yes,Rule,,,Allocate and copy structures containing a flexible array member dynamically,,Memory2,Very Hard,
c,CERT-C,MEM34-C,Yes,Rule,,,Only free memory allocated dynamically,,Memory2,Hard,
c,CERT-C,MEM35-C,Yes,Rule,,,Allocate sufficient memory for an object,,Memory3,Very Hard,
c,CERT-C,MEM36-C,Yes,Rule,,,Do not modify the alignment of objects by calling realloc(),,Memory2,Medium,
c,CERT-C,MSC30-C,Yes,Rule,,,Do not use the rand() function for generating pseudorandom numbers,MSC50-CPP,Misc,Easy,
c,CERT-C,MSC32-C,Yes,Rule,,,Properly seed pseudorandom number generators,MSC51-CPP,Misc,Easy,
c,CERT-C,MSC33-C,Yes,Rule,,,Do not pass invalid data to the asctime() function,,Contracts7,Easy,
c,CERT-C,MSC37-C,Yes,Rule,,,Ensure that control never reaches the end of a non-void function,,Misc,Easy,
c,CERT-C,MSC38-C,Yes,Rule,,,Do not treat a predefined identifier as an object if it might only be implemented as a macro,M17-0-2,Preprocessor5,Medium,
c,CERT-C,MSC39-C,Yes,Rule,,,Do not call va_arg() on a va_list that has an indeterminate value,,Contracts7,Hard,
c,CERT-C,MSC40-C,Yes,Rule,,,Do not violate constraints,,Contracts,Very Hard,
c,CERT-C,MSC41-C,OutOfScope,Rule,,,Never hard code sensitive information,,,,
c,CERT-C,POS30-C,OutOfScope,Rule,,,Use the readlink() function properly,,,,
c,CERT-C,POS34-C,OutOfScope,Rule,,,Do not call putenv() with a pointer to an automatic variable as the argument,,,,
c,CERT-C,POS35-C,OutOfScope,Rule,,,Avoid race conditions while checking for the existence of a symbolic link,,,,
c,CERT-C,POS36-C,OutOfScope,Rule,,,Observe correct revocation order while relinquishing privileges,,,,
c,CERT-C,POS37-C,OutOfScope,Rule,,,Ensure that privilege relinquishment is successful,,,,
c,CERT-C,POS38-C,OutOfScope,Rule,,,Beware of race conditions when using fork and file descriptors,,,,
c,CERT-C,POS39-C,OutOfScope,Rule,,,Use the correct byte ordering when transferring data between systems,,,,
c,CERT-C,POS44-C,OutOfScope,Rule,,,Do not use signals to terminate threads,,,,
c,CERT-C,POS47-C,OutOfScope,Rule,,,Do not use threads that can be canceled asynchronously,,,,
c,CERT-C,POS48-C,OutOfScope,Rule,,,Do not unlock or destroy another POSIX thread's mutex,,,,
c,CERT-C,POS49-C,OutOfScope,Rule,,,"When data must be accessed by multiple threads, provide a mutex and guarantee no adjacent data is also accessed",,,,
c,CERT-C,POS50-C,OutOfScope,Rule,,,Declare objects shared between POSIX threads with appropriate storage durations,,,,
c,CERT-C,POS51-C,OutOfScope,Rule,,,Avoid deadlock with POSIX threads by locking in predefined order,,,,
c,CERT-C,POS52-C,OutOfScope,Rule,,,Do not perform operations that can block while holding a POSIX lock,,,,
c,CERT-C,POS53-C,OutOfScope,Rule,,,Do not use more than one mutex for concurrent waiting operations on a condition variable,,,,
c,CERT-C,POS54-C,OutOfScope,Rule,,,Detect and handle POSIX library errors,,,,
c,CERT-C,PRE30-C,No,Rule,,,Do not create a universal character name through concatenation,,,Medium,Compiler enforced in all supported compilers
c,CERT-C,PRE31-C,Yes,Rule,,,Avoid side effects in arguments to unsafe macros,RULE-13-2,SideEffects4,Medium,
c,CERT-C,PRE32-C,Yes,Rule,,,Do not use preprocessor directives in invocations of function-like macros,,Preprocessor5,Hard,
c,CERT-C,SIG30-C,Yes,Rule,,,Call only asynchronous-safe functions within signal handlers,,SignalHandlers,Medium,
c,CERT-C,SIG31-C,Yes,Rule,,,Do not access shared objects in signal handlers,,SignalHandlers,Medium,
c,CERT-C,SIG34-C,Yes,Rule,,,Do not call signal() from within interruptible signal handlers,,SignalHandlers,Medium,
c,CERT-C,SIG35-C,Yes,Rule,,,Do not return from a computational exception signal handler,,SignalHandlers,Easy,
c,CERT-C,STR30-C,Yes,Rule,,,Do not attempt to modify string literals,,Strings1,Medium,
c,CERT-C,STR31-C,Yes,Rule,,,Guarantee that storage for strings has sufficient space for character data and the null terminator,STR50-CPP,Strings1,Very Hard,
c,CERT-C,STR32-C,Yes,Rule,,,Do not pass a non-null-terminated character sequence to a library function that expects a string,STR51-CPP,Strings1,Very Hard,
c,CERT-C,STR34-C,Yes,Rule,,,Cast characters to unsigned char before converting to larger integer sizes,,Strings3,Hard,
c,CERT-C,STR37-C,Yes,Rule,,,Arguments to character-handling functions must be representable as an unsigned char,,Strings2,Medium,
c,CERT-C,STR38-C,Yes,Rule,,,Do not confuse narrow and wide character strings and functions,,Strings3,Medium,
c,CERT-C,WIN30-C,OutOfScope,Rule,,,Properly pair allocation and deallocation functions,DCL54-CPP,,Easy,
c,MISRA-C-2012,DIR-1-1,No,Required,,,Any implementation-defined behaviour on which the output of the program depends shall be documented and understood,,,,
c,MISRA-C-2012,DIR-2-1,No,Required,,,All source files shall compile without any compilation errors,A1-4-3,,Medium,"This should be checked via the compiler output, rather than CodeQL, which adds unnecessary steps."
c,MISRA-C-2012,DIR-3-1,No,Required,,,All code shall be traceable to documented requirements,,,,
c,MISRA-C-2012,DIR-4-1,No,Required,,,Run-time failures shall be minimized,,,,
c,MISRA-C-2012,DIR-4-2,Yes,Advisory,,,All usage of assembly language should be documented,M7-4-1,Language2,Import,
c,MISRA-C-2012,DIR-4-3,Yes,Required,,,Assembly language shall be encapsulated and isolated,,Language1,Medium,
c,MISRA-C-2012,DIR-4-4,Yes,Advisory,,,Sections of code should not be commented out,A2-7-2,Syntax,Import,
c,MISRA-C-2012,DIR-4-5,Yes,Advisory,,,Identifiers in the same name space with overlapping visibility should be typographically unambiguous,M2-10-1,Syntax,Easy,
c,MISRA-C-2012,DIR-4-6,Yes,Advisory,,,typedefs that indicate size and signedness should be used in place of the basic numerical types,,Types1,Hard,
c,MISRA-C-2012,DIR-4-7,Yes,Required,,,"If a function returns error information, then that error information shall be tested",M0-3-2,Contracts,Import,
c,MISRA-C-2012,DIR-4-8,Yes,Advisory,,,"If a pointer to a structure or union is never dereferenced within a translation unit, then the implementation of the object should be hidden",,Pointers1,Medium,
c,MISRA-C-2012,DIR-4-9,Yes,Advisory,,,A function should be used in preference to a function-like macro where they are interchangeable,,Preprocessor6,Medium,Audit
c,MISRA-C-2012,DIR-4-10,Yes,Required,,,Precautions shall be taken in order to prevent the contents of a header file being included more than once,M16-2-3,Preprocessor2,Medium,
c,MISRA-C-2012,DIR-4-11,Yes,Required,,,The validity of values passed to library functions shall be checked,,Contracts,Hard,
c,MISRA-C-2012,DIR-4-12,Yes,Required,,,Dynamic memory allocation shall not be used,,Banned,Medium,
c,MISRA-C-2012,DIR-4-13,No,Advisory,,,Functions which are designed to provide operations on a resource should be called in an appropriate sequence,,,,Rule 22.1, 22.2 and 22.6 cover aspects of this rule. In other cases this is a design issue and needs to be checked manually.
c,MISRA-C-2012,DIR-4-14,Yes,Required,,,The validity of values received from external sources shall be checked,,Contracts,Hard,This is supported by CodeQLs default C security queries.
c,MISRA-C-2012,RULE-1-1,No,Required,,,"The program shall contain no violations of the standard C syntax and constraints, and shall not exceed the implementation's translation limits",,,Easy,"This should be checked via the compiler output, rather than CodeQL, which adds unnecessary steps."
c,MISRA-C-2012,RULE-1-2,Yes,Advisory,,,Language extensions should not be used,,Language3,Hard,
c,MISRA-C-2012,RULE-1-3,Yes,Required,,,There shall be no occurrence of undefined or critical unspecified behaviour,,Language3,Hard,
c,MISRA-C-2012,RULE-1-4,Yes,Required,,,Emergent language features shall not be used,,Language2,Medium,
c,MISRA-C-2012,RULE-2-1,Yes,Required,,,A project shall not contain unreachable code,M0-1-1,DeadCode,Import,
c,MISRA-C-2012,RULE-2-2,Yes,Required,,,There shall be no dead code,M0-1-9,DeadCode,Import,
c,MISRA-C-2012,RULE-2-3,Yes,Advisory,,,A project should not contain unused type declarations,A0-1-6,DeadCode,Import,
c,MISRA-C-2012,RULE-2-4,Yes,Advisory,,,A project should not contain unused tag declarations,,DeadCode,Easy,
c,MISRA-C-2012,RULE-2-5,Yes,Advisory,,,A project should not contain unused macro declarations,,DeadCode,Easy,
c,MISRA-C-2012,RULE-2-6,Yes,Advisory,,,A function should not contain unused label declarations,,DeadCode,Easy,
c,MISRA-C-2012,RULE-2-7,Yes,Advisory,,,There should be no unused parameters in functions,A0-1-4 A0-1-5,DeadCode,Easy,
c,MISRA-C-2012,RULE-3-1,Yes,Required,,,The character sequences /* and // shall not be used within a comment,M2-7-1,Syntax,Easy,
c,MISRA-C-2012,RULE-3-2,Yes,Required,,,Line-splicing shall not be used in // comments,,Syntax,Easy,
c,MISRA-C-2012,RULE-4-1,Yes,Required,,,Octal and hexadecimal escape sequences shall be terminated,A2-13-1 M2-13-2,Syntax,Medium,
c,MISRA-C-2012,RULE-4-2,No,Advisory,,,Trigraphs should not be used,A2-5-1,,Import,
c,MISRA-C-2012,RULE-5-1,Yes,Required,,,External identifiers shall be distinct,,Declarations1,Medium,
c,MISRA-C-2012,RULE-5-2,Yes,Required,,,Identifiers declared in the same scope and name space shall be distinct,,Declarations5,Medium,
c,MISRA-C-2012,RULE-5-3,Yes,Required,,,An identifier declared in an inner scope shall not hide an identifier declared in an outer scope,A2-10-1,Declarations3,Import,
c,MISRA-C-2012,RULE-5-4,Yes,Required,,,Macro identifiers shall be distinct,,Declarations1,Easy,
c,MISRA-C-2012,RULE-5-5,Yes,Required,,,Identifiers shall be distinct from macro names,,Declarations3,Easy,
c,MISRA-C-2012,RULE-5-6,Yes,Required,,,A typedef name shall be a unique identifier,,Declarations3,Easy,
c,MISRA-C-2012,RULE-5-7,Yes,Required,,,A tag name shall be a unique identifier,,Declarations3,Easy,
c,MISRA-C-2012,RULE-5-8,Yes,Required,,,Identifiers that define objects or functions with external linkage shall be unique,,Declarations6,Easy,
c,MISRA-C-2012,RULE-5-9,Yes,Advisory,,,Identifiers that define objects or functions with internal linkage should be unique,,Declarations6,Easy,
c,MISRA-C-2012,RULE-6-1,Yes,Required,,,Bit-fields shall only be declared with an appropriate type,M9-6-4,BitfieldTypes,Medium,
c,MISRA-C-2012,RULE-6-2,Yes,Required,,,Single-bit named bit fields shall not be of a signed type,M9-6-4,BitfieldTypes,Import,
c,MISRA-C-2012,RULE-7-1,Yes,Required,,,Octal constants shall not be used,M2-13-2,Banned,Import,
c,MISRA-C-2012,RULE-7-2,Yes,Required,,,A �u� or �U� suffix shall be applied to all integer constants that are represented in an unsigned type,M2-13-3,Syntax,Easy,
c,MISRA-C-2012,RULE-7-3,Yes,Required,,,The lowercase character �l� shall not be used in a literal suffix,M2-13-4,Syntax,Easy,
c,MISRA-C-2012,RULE-7-4,Yes,Required,,,A string literal shall not be assigned to an object unless the object�s type is �pointer to const-qualified char�,A2-13-4,Types1,Easy,
c,MISRA-C-2012,RULE-8-1,Yes,Required,,,Types shall be explicitly specified,,Declarations3,Medium,
c,MISRA-C-2012,RULE-8-2,Yes,Required,,,Function types shall be in prototype form with named parameters,,Declarations4,Medium,
c,MISRA-C-2012,RULE-8-3,Yes,Required,,,All declarations of an object or function shall use the same names and type qualifiers,M3-2-1,Declarations4,Medium,
c,MISRA-C-2012,RULE-8-4,Yes,Required,,,A compatible declaration shall be visible when an object or function with external linkage is defined,,Declarations4,Medium,
c,MISRA-C-2012,RULE-8-5,Yes,Required,,,An external object or function shall be declared once in one and only one file,,Declarations5,Medium,
c,MISRA-C-2012,RULE-8-6,Yes,Required,,,An identifier with external linkage shall have exactly one external definition,M3-2-4,Declarations4,Import,
c,MISRA-C-2012,RULE-8-7,Yes,Advisory,,,Functions and objects should not be defined with external linkage if they are referenced in only one translation unit,,Declarations6,Medium,
c,MISRA-C-2012,RULE-8-8,Yes,Required,,,The static storage class specifier shall be used in all declarations of objects and functions that have internal linkage,M3-3-2,Declarations5,Medium,
c,MISRA-C-2012,RULE-8-9,Yes,Advisory,,,An object should be defined at block scope if its identifier only appears in a single function,M3-4-1,Declarations5,Medium,
c,MISRA-C-2012,RULE-8-10,Yes,Required,,,An inline function shall be declared with the static storage class,,Declarations6,Medium,
c,MISRA-C-2012,RULE-8-11,Yes,Advisory,,,"When an array with external linkage is declared, its size should be explicitly specified",,Declarations6,Medium,
c,MISRA-C-2012,RULE-8-12,Yes,Required,,,"Within an enumerator list, the value of an implicitly-specified enumeration constant shall be unique",,Declarations7,Medium,
c,MISRA-C-2012,RULE-8-13,Yes,Advisory,,,A pointer should point to a const-qualified type whenever possible,,Pointers1,Medium,
c,MISRA-C-2012,RULE-8-14,Yes,Required,,,The restrict type qualifier shall not be used,,Banned,Easy,
c,MISRA-C-2012,RULE-9-1,Yes,Mandatory,,,The value of an object with automatic storage duration shall not be read before it has been set,,InvalidMemory1,Import,
c,MISRA-C-2012,RULE-9-2,Yes,Required,,,The initializer for an aggregate or union shall be enclosed in braces,,Memory1,Easy,
c,MISRA-C-2012,RULE-9-3,Yes,Required,,,Arrays shall not be partially initialized,,Memory1,Medium,
c,MISRA-C-2012,RULE-9-4,Yes,Required,,,An element of an object shall not be initialized more than once,,Memory1,Medium,
c,MISRA-C-2012,RULE-9-5,No,Required,,,Where designated initializers are used to initialize an array object the size of the array shall be specified explicitly,,,Medium,
c,MISRA-C-2012,RULE-10-1,Yes,Required,,,Operands shall not be of an inappropriate essential type,,EssentialTypes,Hard,
c,MISRA-C-2012,RULE-10-2,Yes,Required,,,Expressions of essentially character type shall not be used inappropriately in addition and subtraction operations,,EssentialTypes,Medium,
c,MISRA-C-2012,RULE-10-3,Yes,Required,,,The value of an expression shall not be assigned to an object with a narrower essential type or of a different essential type category,,EssentialTypes,Hard,
c,MISRA-C-2012,RULE-10-4,Yes,Required,,,Both operands of an operator in which the usual arithmetic conversions are performed shall have the same essential type category,,EssentialTypes,Medium,
c,MISRA-C-2012,RULE-10-5,Yes,Advisory,,,The value of an expression should not be cast to an inappropriate essential type,,EssentialTypes,Medium,
c,MISRA-C-2012,RULE-10-6,Yes,Required,,,The value of a composite expression shall not be assigned to an object with wider essential type,,EssentialTypes,Medium,
c,MISRA-C-2012,RULE-10-7,Yes,Required,,,If a composite expression is used as one operand of an operator in which the usual arithmetic conversions are performed then the other operand shall not have wider essential type,,EssentialTypes,Medium,
c,MISRA-C-2012,RULE-10-8,Yes,Required,,,The value of a composite expression shall not be cast to a different essential type category or a wider essential type,,EssentialTypes,Medium,
c,MISRA-C-2012,RULE-11-1,Yes,Required,,,Conversions shall not be performed between a pointer to a function and any other type,M5-2-6,Pointers1,Import,
c,MISRA-C-2012,RULE-11-2,Yes,Required,,,Conversions shall not be performed between a pointer to an incomplete type and any other type,,Pointers1,Easy,
c,MISRA-C-2012,RULE-11-3,Yes,Required,,,A cast shall not be performed between a pointer to object type and a pointer to a different object type,,Pointers1,Easy,
c,MISRA-C-2012,RULE-11-4,Yes,Advisory,,,A conversion should not be performed between a pointer to object and an integer type,M-2-9,Pointers1,Easy,
c,MISRA-C-2012,RULE-11-5,Yes,Advisory,,,A conversion should not be performed from pointer to void into pointer to object,,Pointers1,Easy,
c,MISRA-C-2012,RULE-11-6,Yes,Required,,,A cast shall not be performed between pointer to void and an arithmetic type,,Pointers1,Easy,
c,MISRA-C-2012,RULE-11-7,Yes,Required,,,A cast shall not be performed between pointer to object and a non- integer arithmetic type,,Pointers1,Easy,
c,MISRA-C-2012,RULE-11-8,Yes,Required,,,A cast shall not remove any const or volatile qualification from the type pointed to by a pointer,,Pointers1,Easy,
c,MISRA-C-2012,RULE-11-9,Yes,Required,,,The macro NULL shall be the only permitted form of integer null pointer constant,,Pointers1,Easy,
c,MISRA-C-2012,RULE-12-1,Yes,Advisory,,,The precedence of operators within expressions should be made explicit,,SideEffects1,Medium,
c,MISRA-C-2012,RULE-12-2,Yes,Required,,,The right hand operand of a shift operator shall lie in the range zero to one less than the width in bits of the essential type of the left hand operand,,Contracts7,Medium,
c,MISRA-C-2012,RULE-12-3,Yes,Advisory,,,The comma operator should not be used,M5-18-1,Banned,Import,
c,MISRA-C-2012,RULE-12-4,Yes,Advisory,,,Evaluation of constant expressions should not lead to unsigned integer wrap-around,INT30-C,IntegerOverflow,Easy,
c,MISRA-C-2012,RULE-12-5,Yes,Mandatory,,,The sizeof operator shall not have an operand which is a function parameter declared as �array of type�,,Types1,Medium,
c,MISRA-C-2012,RULE-13-1,Yes,Required,,,Initializer lists shall not contain persistent side effects,,SideEffects1,Medium,
c,MISRA-C-2012,RULE-13-2,Yes,Required,,,The value of an expression and its persistent side effects shall be the same under all permitted evaluation orders,PRE31-C,SideEffects3,Medium,
c,MISRA-C-2012,RULE-13-3,Yes,Advisory,,,A full expression containing an increment (++) or decrement (--) operator should have no other potential side effects other than that caused by the increment or decrement operator,,SideEffects2,Medium,
c,MISRA-C-2012,RULE-13-4,Yes,Advisory,,,The result of an assignment operator should not be used,M6-2-1,SideEffects1,Easy,
c,MISRA-C-2012,RULE-13-5,Yes,Required,,,The right hand operand of a logical && or || operator shall not contain persistent side effects,M5-14-1,SideEffects1,Import,
c,MISRA-C-2012,RULE-13-6,Yes,Mandatory,,,The operand of the sizeof operator shall not contain any expressiosn which has potential side effects,M5-3-4,SideEffects1,Import,
c,MISRA-C-2012,RULE-14-1,Yes,Required,,,A loop counter shall not have essentially floating type,FLP30-C A6-5-2,EssentialTypes,Hard,
c,MISRA-C-2012,RULE-14-2,Yes,Required,,,A for loop shall be well-formed,M6-5-1...M6-5-6,Statements4,Medium,
c,MISRA-C-2012,RULE-14-3,Yes,Required,,,Controlling expressions shall not be invariant,,Statements5,Medium,
c,MISRA-C-2012,RULE-14-4,Yes,Required,,,The controlling expression of an if statement and the controlling expression of an iteration-statement shall have essentially Boolean type,A5-0-2,Statements4,Medium,
c,MISRA-C-2012,RULE-15-1,Yes,Advisory,,,The goto statement should not be used,A6-6-1,Statements6,Import,
c,MISRA-C-2012,RULE-15-2,Yes,Required,,,The goto statement shall jump to a label declared later in the same function,M6-6-2,Statements2,Import,
c,MISRA-C-2012,RULE-15-3,Yes,Required,,,"Any label referenced by a goto statement shall be declared in the same block, or in any block enclosing the goto statement",M6-6-1,Statements2,Import,
c,MISRA-C-2012,RULE-15-4,Yes,Advisory,,,There should be no more than one break or goto statement used to terminate any iteration statement,,Statements2,Medium,
c,MISRA-C-2012,RULE-15-5,Yes,Advisory,,,A function should have a single point of exit at the end,,Statements5,Medium,
c,MISRA-C-2012,RULE-15-6,Yes,Required,,,The body of an iteration-statement or a selection-statement shall be a compund-statement,M6-3-1,Statements3,Import,
c,MISRA-C-2012,RULE-15-7,Yes,Required,,,All if / else if constructs shall be terminated with an else statement,M6-4-2,Statements3,Import,
c,MISRA-C-2012,RULE-16-1,Yes,Required,,,All switch statements shall be well-formed,M6-4-3,Statements3,Import,
c,MISRA-C-2012,RULE-16-2,Yes,Required,,,A switch label shall only be used when the most closely-enclosing compound statement is the body of a switch statement,M6-4-4,Statements1,Import,
c,MISRA-C-2012,RULE-16-3,Yes,Required,,,An unconditional break statement shall terminate every switch-clause,M6-4-5,Statements1,Import,
c,MISRA-C-2012,RULE-16-4,Yes,Required,,,Every switch statement shall have a default label,M6-4-6,Statements1,Easy,
c,MISRA-C-2012,RULE-16-5,Yes,Required,,,A default label shall appear as either the first or the last switch label of a switch statement,M6-4-6,Statements1,Easy,
c,MISRA-C-2012,RULE-16-6,Yes,Required,,,Every switch statement shall have at least two switch-clauses,A6-4-1,Statements2,Medium,
c,MISRA-C-2012,RULE-16-7,Yes,Required,,,A switch-expression shall not have essentially Boolean type,M6-4-7,Statements2,Medium,
c,MISRA-C-2012,RULE-17-1,Yes,Required,,,The features of <stdarg.h> shall not be used,,Banned,Easy,
c,MISRA-C-2012,RULE-17-2,Yes,Required,,,"Functions shall not call themselves, either directly or indirectly",A7-5-2,Statements3,Import,
c,MISRA-C-2012,RULE-17-3,Yes,Mandatory,,,A function shall not be declared implicitly,,Declarations6,Medium,
c,MISRA-C-2012,RULE-17-4,Yes,Mandatory,,,All exit paths from a function with non-void return type shall have an explicit return statement with an expression,MSC52-CPP,Statements5,Medium,
c,MISRA-C-2012,RULE-17-5,Yes,Advisory,,,The function argument corresponding to a parameter declared to have an array type shall have an appropriate number of elements,,Contracts6,Hard,
c,MISRA-C-2012,RULE-17-6,Yes,Mandatory,,,The declaration of an array parameter shall not contain the static keyword between the [ ],,Static,Easy,
c,MISRA-C-2012,RULE-17-7,Yes,Required,,,The value returned by a function having non-void return type shall be used,A0-1-2,Contracts6,Easy,
c,MISRA-C-2012,RULE-17-8,Yes,Advisory,,,A function parameter should not be modified,,SideEffects2,Medium,
c,MISRA-C-2012,RULE-18-1,Yes,Required,,,A pointer resulting from arithmetic on a pointer operand shall address an element of the same array as that pointer operand,M5-0-16,Pointers1,Import,
c,MISRA-C-2012,RULE-18-2,Yes,Required,,,Subtraction between pointers shall only be applied to pointers that address elements of the same array,M5-0-17,Pointers1,Import,
c,MISRA-C-2012,RULE-18-3,Yes,Required,,,"The relational operators >, >=, < and <= shall not be applied to objects of pointer type except where they point into the same object",M5-0-18,Pointers1,Import,
c,MISRA-C-2012,RULE-18-4,Yes,Advisory,,,"The +, -, += and -= operators should not be applied to an expression of pointer type",M5-0-15,Pointers1,Medium,
c,MISRA-C-2012,RULE-18-5,Yes,Advisory,,,Declarations should contain no more than two levels of pointer nesting,A5-0-3,Pointers1,Import,
c,MISRA-C-2012,RULE-18-6,Yes,Required,,,The address of an object with automatic storage shall not be copied to another object that persists after the first object has ceased to exist,M7-5-2,Pointers1,Import,
c,MISRA-C-2012,RULE-18-7,Yes,Required,,,Flexible array members shall not be declared,,Declarations6,Medium,
c,MISRA-C-2012,RULE-18-8,Yes,Required,,,Variable-length array types shall not be used,,Declarations7,Medium,
c,MISRA-C-2012,RULE-19-1,Yes,Mandatory,,,An object shall not be assigned or copied to an overlapping object,M0-2-1,Contracts7,Hard,
c,MISRA-C-2012,RULE-19-2,Yes,Advisory,,,The union keyword should not be used,A9-5-1,Banned,Import,
c,MISRA-C-2012,RULE-20-1,Yes,Advisory,,,#include directives should only be preceded by preprocessor directives or comments,M16-0-1,Preprocessor1,Import,
c,MISRA-C-2012,RULE-20-2,Yes,Required,,,"The ', "" or \ characters and the /* or // character sequences shall not occur in a header file name",A16-2-1,Preprocessor1,Import,
c,MISRA-C-2012,RULE-20-3,No,Required,,,"The #include directive shall be followed by either a <filename> or ""filename"" sequence",,,Easy,This is verified by the compiler
c,MISRA-C-2012,RULE-20-4,Yes,Required,,,A macro shall not be defined with the same name as a keyword,A17-0-1,Preprocessor4,Medium,
c,MISRA-C-2012,RULE-20-5,Yes,Advisory,,,#undef should not be used,,Preprocessor2,Easy,
c,MISRA-C-2012,RULE-20-6,Yes,Required,,,Tokens that look like a preprocessing directive shall not occur within a macro argument,M16-0-5,Preprocessor4,Import,
c,MISRA-C-2012,RULE-20-7,Yes,Required,,,Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses,M16-0-6,Preprocessor5,Easy,
c,MISRA-C-2012,RULE-20-8,Yes,Required,,,The controlling expression of a #if or #elif preprocessing directive shall evaluate to 0 or 1,,Preprocessor3,Hard,
c,MISRA-C-2012,RULE-20-9,Yes,Required,,,All identifiers used in the controlling expression of #if or #elif preprocessing directives shall be #defined before evaluation,M16-0-7,Preprocessor1,Import,
c,MISRA-C-2012,RULE-20-10,Yes,Advisory,,,The # and ## preprocessor operators should not be used,M16-3-2,Preprocessor1,Import,
c,MISRA-C-2012,RULE-20-11,Yes,Required,,,A macro parameter immediately following a # operator shall not immediately be followed by a ## operator,M16-3-1,Preprocessor2,Easy,
c,MISRA-C-2012,RULE-20-12,Yes,Required,,,"A macro parameter used as an operand to the # or ## operators, which is itself subject to further macro replacement, shall only be used as an operand to these operators",,Preprocessor2,Medium,
c,MISRA-C-2012,RULE-20-13,No,Required,,,A line whose first token is # shall be a valid preprocessing directive,M16-0-8,,,This is verified by the compiler in the cases where the token is not within an ifdef branch that's never taken
c,MISRA-C-2012,RULE-20-14,No,Required,,,"All #else, #elif and #endif preprocessor directives shall reside in the same file as the #if, #ifdef or #ifndef directive to which they are related",M16-1-2,,,Compilers already prohibit this case
c,MISRA-C-2012,RULE-21-1,Yes,Required,,,#define and #undef shall not be used on a reserved identifier or reserved macro name,,Preprocessor4,Hard,
c,MISRA-C-2012,RULE-21-2,Yes,Required,,,A reserved identifier or reserved macro name shall not be declared,,Declarations1,Hard,
c,MISRA-C-2012,RULE-21-3,Yes,Required,,,The memory allocation and deallocation functions of <stdlib.h> shall not be used,,Banned,Medium,
c,MISRA-C-2012,RULE-21-4,Yes,Required,,,The standard header file shall not be used <setjmp.h>,,Banned,Easy,
c,MISRA-C-2012,RULE-21-5,Yes,Required,,,The standard header file shall not be used <signal.h>,,Banned,Easy,
c,MISRA-C-2012,RULE-21-6,Yes,Required,,,The Standard Library input/output functions shall not be used,,Banned,Easy,
c,MISRA-C-2012,RULE-21-7,Yes,Required,,,"The Standard Library functions atof, atoi, atol and atoll of <stdlib.h> shall not be used",,Banned,Easy,
c,MISRA-C-2012,RULE-21-8,Yes,Required,,,The Standard Library termination functions of <stdlib.h> shall not be used,ERR50-CPP,Banned,Easy,
c,MISRA-C-2012,RULE-21-9,Yes,Required,,,The Standard Library functions bsearch and qsort of <stdlib.h> shall not be used,,Banned,Easy,
c,MISRA-C-2012,RULE-21-10,Yes,Required,,,The Standard Library time and date functions shall not be used,,Banned,Easy,
c,MISRA-C-2012,RULE-21-11,Yes,Required,,,The standard header file <tgmath.h> shall not be used,,Banned,Easy,
c,MISRA-C-2012,RULE-21-12,Yes,Advisory,,,The exception handling features of <fenv.h> should not be used,,Banned,Easy,
c,MISRA-C-2012,RULE-21-13,Yes,Mandatory,,,Any value passed to a function in <ctype.h> shall be representable as an unsigned char or be the value EOF,,StandardLibraryFunctionTypes,Medium,
c,MISRA-C-2012,RULE-21-14,Yes,Required,,,The Standard Library function memcmp shall not be used to compare null terminated strings,,EssentialTypes,Hard,
c,MISRA-C-2012,RULE-21-15,Yes,Required,,,"The pointer arguments to the Standard Library functions memcpy, memmove and memcmp shall be pointers to qualified or unqualified versions of compatible types",,StandardLibraryFunctionTypes,Medium,
c,MISRA-C-2012,RULE-21-16,Yes,Required,,,"The pointer arguments to the Standard Library function memcmp shall point to either a pointer type, an essentially signed type, an essentially unsigned type, an essentially Boolean type or an essentially enum type",,EssentialTypes,Medium,
c,MISRA-C-2012,RULE-21-17,Yes,Mandatory,,,Use of the string handling functions from <string.h> shall not result in accesses beyond the bounds of the objects referenced by their pointer parameters,,OutOfBounds,Hard,
c,MISRA-C-2012,RULE-21-18,Yes,Mandatory,,,The size_t argument passed to any function in <string.h> shall have an appropriate value,,OutOfBounds,Hard,
c,MISRA-C-2012,RULE-21-19,Yes,Mandatory,,,"The pointers returned by the Standard Library functions localeconv, getenv, setlocale or, strerror shall only be used as if they have pointer to const-qualified type",ENV30-C,Contracts2,Medium,
c,MISRA-C-2012,RULE-21-20,Yes,Mandatory,,,"The pointer returned by the Standard Library functions asctime, ctime, gmtime, localtime, localeconv, getenv, setlocale or strerror shall not be used following a subsequent call to the same function",ENV34-C,Contracts2,Import,
c,MISRA-C-2012,RULE-21-21,Yes,Required,,,The Standard Library function system of <stdlib.h> shall not be used,ENV33-C,Banned,Import,
c,MISRA-C-2012,RULE-22-1,Yes,Required,,,All resources obtained dynamically by means of Standard Library functions shall be explicitly released,,Memory2,Hard,
c,MISRA-C-2012,RULE-22-2,Yes,Mandatory,,,A block of memory shall only be freed if it was allocated by means of a Standard Library function,,Memory2,Hard,
c,MISRA-C-2012,RULE-22-3,Yes,Required,,,The same file shall not be open for read and write access at the same time on different streams,,IO3,Hard,
c,MISRA-C-2012,RULE-22-4,Yes,Mandatory,,,There shall be no attempt to write to a stream which has been opened as read-only,,IO3,Medium,
c,MISRA-C-2012,RULE-22-5,Yes,Mandatory,,,A pointer to a FILE object shall not be dereferenced,,IO3,Medium,
c,MISRA-C-2012,RULE-22-6,Yes,Mandatory,,,The value of a pointer to a FILE shall not be used after the associated stream has been closed,FIO46-C,IO1,Import,
c,MISRA-C-2012,RULE-22-7,Yes,Required,,,The macro EOF shall only be compared with the unmodified return value from any Standard Library function capable of returning EOF,,IO3,Hard,
c,MISRA-C-2012,RULE-22-8,Yes,Required,,,The value of errno shall be set to zero prior to a call to an errno-setting-function,ERR30-C,Contracts3,Medium,
c,MISRA-C-2012,RULE-22-9,Yes,Required,,,The value of errno shall be tested against zero after calling an errno-setting-function,,Contracts3,Medium,
c,MISRA-C-2012,RULE-22-10,Yes,Required,,,The value of errno shall only be tested when the last function to be called was an errno-setting-function,,Contracts3,Medium,
cpp,MISRA-C++-2023,RULE-0-0-1,Yes,Required,Decidable,Single Translation Unit,A function shall not contain unreachable statements,,,Medium,
cpp,MISRA-C++-2023,RULE-0-0-2,Yes,Advisory,Undecidable,System,Controlling expressions should not be invariant,,,Easy,
cpp,MISRA-C++-2023,RULE-0-1-1,Yes,Advisory,Undecidable,System,A value should not be unnecessarily written to a local object,,,Medium,
cpp,MISRA-C++-2023,RULE-0-1-2,Yes,Required,Decidable,Single Translation Unit,The value returned by a function shall be used,,,Easy,
cpp,MISRA-C++-2023,RULE-0-2-1,Yes,Advisory,Decidable,Single Translation Unit,Variables with limited visibility should be used at least once,,,Easy,
cpp,MISRA-C++-2023,RULE-0-2-2,Yes,Required,Decidable,Single Translation Unit,A named function parameter shall be used at least once,,,Easy,
cpp,MISRA-C++-2023,RULE-0-2-3,Yes,Advisory,Decidable,Single Translation Unit,Types with limited visibility should be used at least once,,,Easy,
cpp,MISRA-C++-2023,RULE-0-2-4,Yes,Advisory,Decidable,System,Functions with limited visibility should be used at least once,,,Easy,
cpp,MISRA-C++-2023,DIR-0-3-1,Yes,Advisory,,,Floating-point arithmetic should be used appropriately,,,Hard,
cpp,MISRA-C++-2023,DIR-0-3-2,Yes,Required,,,A function call shall not violate the function’s preconditions,,,Hard,
cpp,MISRA-C++-2023,RULE-4-1-1,Yes,Required,Undecidable,System,A program shall conform to ISO/IEC 14882:2017 (C++17),,,Hard,
cpp,MISRA-C++-2023,RULE-4-1-2,Yes,Advisory,Decidable,Single Translation Unit,Deprecated features should not be used,,,Very Hard,
cpp,MISRA-C++-2023,RULE-4-1-3,Yes,Required,Undecidable,System,There shall be no occurrence of undefined or critical unspecified behaviour,,,Very Hard,
cpp,MISRA-C++-2023,RULE-4-6-1,Yes,Required,Undecidable,System,Operations on a memory location shall be sequenced appropriately,,,Import,
cpp,MISRA-C++-2023,RULE-5-0-1,Yes,Advisory,Decidable,Single Translation Unit,Trigraph-like sequences should not be used,,,Very Hard,
cpp,MISRA-C++-2023,RULE-5-7-1,Yes,Required,Decidable,Single Translation Unit,The character sequence /* shall not be used within a C-style comment,,,Import,
cpp,MISRA-C++-2023,DIR-5-7-2,Yes,Advisory,,,Sections of code should not be “commented out”,,,Import,
cpp,MISRA-C++-2023,RULE-5-7-3,Yes,Required,Decidable,Single Translation Unit,Line-splicing shall not be used in // comments,,,Import,
cpp,MISRA-C++-2023,RULE-5-10-1,Yes,Required,Decidable,Single Translation Unit,User-defined identifiers shall have an appropriate form,,,Easy,
cpp,MISRA-C++-2023,RULE-5-13-1,Yes,Required,Decidable,Single Translation Unit,"In character literals and non-raw string literals, \ shall only be used to form a defined escape sequence or universal character name",,,Import,
cpp,MISRA-C++-2023,RULE-5-13-2,Yes,Required,Decidable,Single Translation Unit,"Octal escape sequences, hexadecimal escape sequences, and universal character names shall be terminated",,,Import,
cpp,MISRA-C++-2023,RULE-5-13-3,Yes,Required,Decidable,Single Translation Unit,Octal constants shall not be used,,,Import,
cpp,MISRA-C++-2023,RULE-5-13-4,Yes,Required,Decidable,Single Translation Unit,Unsigned integer literals shall be appropriately suffixed,,,Import,
cpp,MISRA-C++-2023,RULE-5-13-5,Yes,Required,Decidable,Single Translation Unit,The lowercase form of L shall not be used as the first character in a literal suffix,,,Import,
cpp,MISRA-C++-2023,RULE-5-13-6,Yes,Required,Decidable,Single Translation Unit,An integer-literal of type long long shall not use a single L or l in any suffix,,,Easy,
cpp,MISRA-C++-2023,RULE-5-13-7,No,Required,Decidable,Single Translation Unit,String literals with different encoding prefixes shall not be concatenated,,,,
cpp,MISRA-C++-2023,RULE-6-0-1,Yes,Required,Decidable,Single Translation Unit,Block scope declarations shall not be visually ambiguous,,,Easy,
cpp,MISRA-C++-2023,RULE-6-0-2,Yes,Advisory,Decidable,Single Translation Unit,"When an array with external linkage is declared, its size should be explicitly specified",,,Easy,
cpp,MISRA-C++-2023,RULE-6-0-3,Yes,Advisory,Decidable,Single Translation Unit,"The only declarations in the global namespace should be main, namespace declarations and extern ""C"" declarations",,,Import,
cpp,MISRA-C++-2023,RULE-6-0-4,Yes,Required,Decidable,Single Translation Unit,The identifier main shall not be used for a function other than the global function main,,,Import,
cpp,MISRA-C++-2023,RULE-6-2-1,Yes,Required,Decidable,System,The one-definition rule shall not be violated,,,Import,
cpp,MISRA-C++-2023,RULE-6-2-2,Yes,Required,Decidable,System,All declarations of a variable or function shall have the same type,,,Easy,
cpp,MISRA-C++-2023,RULE-6-2-3,Yes,Required,Decidable,System,The source code used to implement an entity shall appear only once,,,Medium,
cpp,MISRA-C++-2023,RULE-6-2-4,Yes,Required,Decidable,Single Translation Unit,A header file shall not contain definitions of functions or objects that are non-inline and have external linkage,,,Easy,
cpp,MISRA-C++-2023,RULE-6-4-1,Yes,Required,Decidable,Single Translation Unit,A variable declared in an inner scope shall not hide a variable declared in an outer scope,,,Import,
cpp,MISRA-C++-2023,RULE-6-4-2,Yes,Required,Decidable,Single Translation Unit,Derived classes shall not conceal functions that are inherited from their bases,,,Import,
cpp,MISRA-C++-2023,RULE-6-4-3,Yes,Required,Decidable,Single Translation Unit,A name that is present in a dependent base shall not be resolved by unqualified lookup,,,Import,
cpp,MISRA-C++-2023,RULE-6-5-1,Yes,Advisory,Decidable,Single Translation Unit,A function or object with external linkage should be introduced in a header file,,,Medium,
cpp,MISRA-C++-2023,RULE-6-5-2,Yes,Advisory,Decidable,Single Translation Unit,Internal linkage should be specified appropriately,,,Medium,
cpp,MISRA-C++-2023,RULE-6-7-1,Yes,Required,Decidable,Single Translation Unit,Local variables shall not have static storage duration,,,Easy,
cpp,MISRA-C++-2023,RULE-6-7-2,Yes,Required,Decidable,Single Translation Unit,Global variables shall not be used,,,Easy,
cpp,MISRA-C++-2023,RULE-6-8-1,Yes,Required,Undecidable,System,An object shall not be accessed outside of its lifetime,,,Import,
cpp,MISRA-C++-2023,RULE-6-8-2,Yes,Mandatory,Decidable,Single Translation Unit,A function must not return a reference or a pointer to a local variable with automatic storage duration,,,Import,
cpp,MISRA-C++-2023,RULE-6-8-3,Yes,Required,Decidable,Single Translation Unit,An assignment operator shall not assign the address of an object with automatic storage duration to an object with a greater lifetime,,,Medium,
cpp,MISRA-C++-2023,RULE-6-8-4,Yes,Advisory,Decidable,Single Translation Unit,Member functions returning references to their object should be refqualified appropriately,,,Medium,
cpp,MISRA-C++-2023,RULE-6-9-1,Yes,Required,Decidable,Single Translation Unit,The same type aliases shall be used in all declarations of the same entity,,,Medium,
cpp,MISRA-C++-2023,RULE-6-9-2,Yes,Advisory,Decidable,Single Translation Unit,The names of the standard signed integer types and standard unsigned integer types should not be used,,,Easy,
cpp,MISRA-C++-2023,RULE-7-0-1,Yes,Required,Decidable,Single Translation Unit,There shall be no conversion from type bool,,,Easy,
cpp,MISRA-C++-2023,RULE-7-0-2,Yes,Required,Decidable,Single Translation Unit,There shall be no conversion to type bool,,,Easy,
cpp,MISRA-C++-2023,RULE-7-0-3,Yes,Required,Decidable,Single Translation Unit,The numerical value of a character shall not be used,,,Medium,
cpp,MISRA-C++-2023,RULE-7-0-4,Yes,Required,Decidable,Single Translation Unit,The operands of bitwise operators and shift operators shall be appropriate,,,Medium,
cpp,MISRA-C++-2023,RULE-7-0-5,Yes,Required,Decidable,Single Translation Unit,Integral promotion and the usual arithmetic conversions shall not change the signedness or the type category of an operand,,,Medium,
cpp,MISRA-C++-2023,RULE-7-0-6,Yes,Required,Decidable,Single Translation Unit,Assignment between numeric types shall be appropriate,,,Hard,
cpp,MISRA-C++-2023,RULE-7-11-1,Yes,Required,Decidable,Single Translation Unit,nullptr shall be the only form of the null-pointer-constant,,,Import,
cpp,MISRA-C++-2023,RULE-7-11-2,Yes,Required,Decidable,Single Translation Unit,An array passed as a function argument shall not decay to a pointer,,,Import,
cpp,MISRA-C++-2023,RULE-7-11-3,Yes,Required,Decidable,Single Translation Unit,A conversion from function type to pointer-to-function type shall only occur in appropriate contexts,,,Easy,
cpp,MISRA-C++-2023,RULE-8-0-1,Yes,Advisory,Decidable,Single Translation Unit,Parentheses should be used to make the meaning of an expression appropriately explicit,,,Medium,
cpp,MISRA-C++-2023,RULE-8-1-1,Yes,Required,Decidable,Single Translation Unit,A non-transient lambda shall not implicitly capture this,,,Easy,
cpp,MISRA-C++-2023,RULE-8-1-2,Yes,Advisory,Decidable,Single Translation Unit,Variables should be captured explicitly in a non-transient lambda,,,Easy,
cpp,MISRA-C++-2023,RULE-8-2-1,Yes,Required,Decidable,Single Translation Unit,A virtual base class shall only be cast to a derived class by means of dynamic_cast,,,Easy,
cpp,MISRA-C++-2023,RULE-8-2-2,Yes,Required,Decidable,Single Translation Unit,C-style casts and functional notation casts shall not be used,,,Easy,
cpp,MISRA-C++-2023,RULE-8-2-3,Yes,Required,Decidable,Single Translation Unit,A cast shall not remove any const or volatile qualification from the type accessed via a pointer or by reference,,,Import,
cpp,MISRA-C++-2023,RULE-8-2-4,Yes,Required,Decidable,Single Translation Unit,Casts shall not be performed between a pointer to function and any other type,,,Import,
cpp,MISRA-C++-2023,RULE-8-2-5,Yes,Required,Decidable,Single Translation Unit,reinterpret_cast shall not be used,,,Import,
cpp,MISRA-C++-2023,RULE-8-2-6,Yes,Required,Decidable,Single Translation Unit,"An object with integral, enumerated, or pointer to void type shall not be cast to a pointer type",,,Easy,
cpp,MISRA-C++-2023,RULE-8-2-7,Yes,Advisory,Decidable,Single Translation Unit,A cast should not convert a pointer type to an integral type,,,Easy,
cpp,MISRA-C++-2023,RULE-8-2-8,Yes,Required,Decidable,Single Translation Unit,An object pointer type shall not be cast to an integral type other than std::uintptr_t or std::intptr_t,,,Easy,
cpp,MISRA-C++-2023,RULE-8-2-9,Yes,Required,Decidable,Single Translation Unit,The operand to typeid shall not be an expression of polymorphic class type,,,Easy,
cpp,MISRA-C++-2023,RULE-8-2-10,Yes,Required,Undecidable,System,"Functions shall not call themselves, either directly or indirectly",,,Import,
cpp,MISRA-C++-2023,RULE-8-2-11,Yes,Required,Decidable,Single Translation Unit,An argument passed via ellipsis shall have an appropriate type,,,Easy,
cpp,MISRA-C++-2023,RULE-8-3-1,Yes,Advisory,Decidable,Single Translation Unit,The built-in unary - operator should not be applied to an expression of unsigned type,,,Import,
cpp,MISRA-C++-2023,RULE-8-3-2,Yes,Advisory,Decidable,Single Translation Unit,The built-in unary + operator should not be used,,,Easy,
cpp,MISRA-C++-2023,RULE-8-7-1,Yes,Required,Undecidable,System,Pointer arithmetic shall not form an invalid pointer,,,Easy,
cpp,MISRA-C++-2023,RULE-8-7-2,Yes,Required,Undecidable,System,Subtraction between pointers shall only be applied to pointers that address elements of the same array,,,Easy,
cpp,MISRA-C++-2023,RULE-8-9-1,Yes,Required,Undecidable,System,"The built-in relational operators >, >=, < and <= shall not be applied to objects of pointer type, except where they point to elements of the same array",,,Easy,
cpp,MISRA-C++-2023,RULE-8-14-1,Yes,Advisory,Undecidable,System,The right-hand operand of a logical && or operator should not contain persistent side effects,,,Medium,
cpp,MISRA-C++-2023,RULE-8-18-1,Yes,Mandatory,Undecidable,System,An object or subobject must not be copied to an overlapping object,,,Hard,
cpp,MISRA-C++-2023,RULE-8-18-2,Yes,Advisory,Decidable,Single Translation Unit,The result of an assignment operator should not be used,,,Import,
cpp,MISRA-C++-2023,RULE-8-19-1,Yes,Advisory,Decidable,Single Translation Unit,The comma operator should not be used,,,Import,
cpp,MISRA-C++-2023,RULE-8-20-1,Yes,Advisory,Decidable,Single Translation Unit,An unsigned arithmetic operation with constant operands should not wrap,,,Import,
cpp,MISRA-C++-2023,RULE-9-2-1,Yes,Required,Decidable,Single Translation Unit,An explicit type conversion shall not be an expression statement,,,Easy,
cpp,MISRA-C++-2023,RULE-9-3-1,Yes,Required,Decidable,Single Translation Unit,The body of an iteration-statement or a selection-statement shall be a compound-statement,,,Import,
cpp,MISRA-C++-2023,RULE-9-4-1,Yes,Required,Decidable,Single Translation Unit,All if ... else if constructs shall be terminated with an else statement,,,Import,
cpp,MISRA-C++-2023,RULE-9-4-2,Yes,Required,Decidable,Single Translation Unit,The structure of a switch statement shall be appropriate,,,Medium,
cpp,MISRA-C++-2023,RULE-9-5-1,Yes,Advisory,Decidable,Single Translation Unit,Legacy for statements should be simple,,,Hard,
cpp,MISRA-C++-2023,RULE-9-5-2,Yes,Required,Decidable,Single Translation Unit,A for-range-initializer shall contain at most one function call,,,Easy,
cpp,MISRA-C++-2023,RULE-9-6-1,Yes,Advisory,Decidable,Single Translation Unit,The goto statement should not be used,,,Import,
cpp,MISRA-C++-2023,RULE-9-6-2,Yes,Required,Decidable,Single Translation Unit,A goto statement shall reference a label in a surrounding block,,,Import,
cpp,MISRA-C++-2023,RULE-9-6-3,Yes,Required,Decidable,Single Translation Unit,The goto statement shall jump to a label declared later in the function body,,,Import,
cpp,MISRA-C++-2023,RULE-9-6-4,Yes,Required,Undecidable,System,A function declared with the [[noreturn]] attribute shall not return,,,Import,
cpp,MISRA-C++-2023,RULE-9-6-5,Yes,Required,Decidable,Single Translation Unit,A function with non-void return type shall return a value on all paths,,,Import,
cpp,MISRA-C++-2023,RULE-10-0-1,Yes,Advisory,Decidable,Single Translation Unit,A declaration should not declare more than one variable or member variable,,,Import,
cpp,MISRA-C++-2023,RULE-10-1-1,Yes,Advisory,Decidable,Single Translation Unit,The target type of a pointer or lvalue reference parameter should be const-qualified appropriately,,,Hard,
cpp,MISRA-C++-2023,RULE-10-1-2,Yes,Required,Decidable,Single Translation Unit,The volatile qualifier shall be used appropriately,,,Easy,
cpp,MISRA-C++-2023,RULE-10-2-1,Yes,Required,Decidable,Single Translation Unit,An enumeration shall be defined with an explicit underlying type,,,Import,
cpp,MISRA-C++-2023,RULE-10-2-2,Yes,Advisory,Decidable,Single Translation Unit,Unscoped enumerations should not be declared,,,Easy,
cpp,MISRA-C++-2023,RULE-10-2-3,Yes,Required,Decidable,Single Translation Unit,The numeric value of an unscoped enumeration with no fixed underlying type shall not be used,,,Easy,
cpp,MISRA-C++-2023,RULE-10-3-1,Yes,Advisory,Decidable,Single Translation Unit,There should be no unnamed namespaces in header files,,,Easy,
cpp,MISRA-C++-2023,RULE-10-4-1,Yes,Required,Decidable,Single Translation Unit,The asm declaration shall not be used,,,Import,
cpp,MISRA-C++-2023,RULE-11-3-1,Yes,Advisory,Decidable,Single Translation Unit,Variables of array type should not be declared,,,Easy,
cpp,MISRA-C++-2023,RULE-11-3-2,Yes,Advisory,Decidable,Single Translation Unit,The declaration of an object should contain no more than two levels of pointer indirection,,,Import,
cpp,MISRA-C++-2023,RULE-11-6-1,Yes,Advisory,Decidable,Single Translation Unit,All variables should be initialized,,,Easy,
cpp,MISRA-C++-2023,RULE-11-6-2,Yes,Mandatory,Undecidable,System,The value of an object must not be read before it has been set,,,Very Hard,
cpp,MISRA-C++-2023,RULE-11-6-3,Yes,Required,Decidable,Single Translation Unit,"Within an enumerator list, the value of an implicitly-specified enumeration constant shall be unique",,,Import,
cpp,MISRA-C++-2023,RULE-12-2-1,Yes,Advisory,Decidable,Single Translation Unit,Bit-fields should not be declared,,,Easy,
cpp,MISRA-C++-2023,RULE-12-2-2,Yes,Required,Decidable,Single Translation Unit,A bit-field shall have an appropriate type,,,Import,
cpp,MISRA-C++-2023,RULE-12-2-3,Yes,Required,Decidable,Single Translation Unit,A named bit-field with signed integer type shall not have a length of one bit,,,Import,
cpp,MISRA-C++-2023,RULE-12-3-1,Yes,Required,Decidable,Single Translation Unit,The union keyword shall not be used,,,Easy,
cpp,MISRA-C++-2023,RULE-13-1-1,Yes,Advisory,Decidable,Single Translation Unit,Classes should not be inherited virtually,,,Easy,
cpp,MISRA-C++-2023,RULE-13-1-2,Yes,Required,Decidable,Single Translation Unit,An accessible base class shall not be both virtual and non-virtual in the same hierarchy,,,Import,
cpp,MISRA-C++-2023,RULE-13-3-1,Yes,Required,Decidable,Single Translation Unit,"User-declared member functions shall use the virtual, override and final specifiers appropriately",,,Easy,
cpp,MISRA-C++-2023,RULE-13-3-2,Yes,Required,Decidable,Single Translation Unit,Parameters in an overriding virtual function shall not specify different default arguments,,,Import,
cpp,MISRA-C++-2023,RULE-13-3-3,Yes,Required,Decidable,System,The parameters in all declarations or overrides of a function shall either be unnamed or have identical names,,,Import,
cpp,MISRA-C++-2023,RULE-13-3-4,Yes,Required,Decidable,Single Translation Unit,A comparison of a potentially virtual pointer to member function shall only be with nullptr,,,Import,
cpp,MISRA-C++-2023,RULE-14-1-1,Yes,Advisory,Decidable,Single Translation Unit,Non-static data members should be either all private or all public,,,Easy,
cpp,MISRA-C++-2023,RULE-15-0-1,Yes,Required,Decidable,Single Translation Unit,Special member functions shall be provided appropriately,,,Medium,
cpp,MISRA-C++-2023,RULE-15-0-2,Yes,Advisory,Decidable,Single Translation Unit,User-provided copy and move member functions of a class should have appropriate signatures,,,Easy,
cpp,MISRA-C++-2023,RULE-15-1-1,Yes,Required,Undecidable,System,An object’s dynamic type shall not be used from within its constructor or destructor,,,Import,
cpp,MISRA-C++-2023,RULE-15-1-2,Yes,Advisory,Decidable,Single Translation Unit,All constructors of a class should explicitly initialize all of its virtual base classes and immediate base classes,,,Import,
cpp,MISRA-C++-2023,RULE-15-1-3,Yes,Required,Decidable,Single Translation Unit,Conversion operators and constructors that are callable with a single argument shall be explicit,,,Easy,
cpp,MISRA-C++-2023,RULE-15-1-4,Yes,Advisory,Decidable,Single Translation Unit,"All direct, non-static data members of a class should be initialized before the class object is accessible",,,Hard,
cpp,MISRA-C++-2023,RULE-15-1-5,Yes,Required,Decidable,Single Translation Unit,A class shall only define an initializer-list constructor when it is the only constructor,,,Import,
cpp,MISRA-C++-2023,DIR-15-8-1,Yes,Required,#VALUE!,,User-provided copy assignment operators and move assignment operators shall handle self-assignment,,,Import,
cpp,MISRA-C++-2023,RULE-16-5-1,Yes,Required,Decidable,Single Translation Unit,The logical AND and logical OR operators shall not be overloaded,,,Easy,
cpp,MISRA-C++-2023,RULE-16-5-2,Yes,Required,Decidable,Single Translation Unit,The address-of operator shall not be overloaded,,,Import,
cpp,MISRA-C++-2023,RULE-16-6-1,Yes,Advisory,Decidable,Single Translation Unit,Symmetrical operators should only be implemented as non-member functions,,,Medium,
cpp,MISRA-C++-2023,RULE-17-8-1,Yes,Required,Decidable,Single Translation Unit,Function templates shall not be explicitly specialized,,,Import,
cpp,MISRA-C++-2023,RULE-18-1-1,Yes,Required,Decidable,Single Translation Unit,An exception object shall not have pointer type,,,Import,
cpp,MISRA-C++-2023,RULE-18-1-2,Yes,Required,Decidable,Single Translation Unit,An empty throw shall only occur within the compound-statement of a catch handler,,,Import,
cpp,MISRA-C++-2023,RULE-18-3-1,Yes,Advisory,Decidable,Single Translation Unit,There should be at least one exception handler to catch all otherwise unhandled exceptions,,,Easy,
cpp,MISRA-C++-2023,RULE-18-3-2,Yes,Required,Decidable,Single Translation Unit,An exception of class type shall be caught by const reference or reference,,,Easy,
cpp,MISRA-C++-2023,RULE-18-3-3,Yes,Required,Decidable,Single Translation Unit,Handlers for a function-try-block of a constructor or destructor shall not refer to non-static members from their class or its bases,,,Import,
cpp,MISRA-C++-2023,RULE-18-4-1,Yes,Required,Decidable,Single Translation Unit,Exception-unfriendly functions shall be noexcept,,,Easy,
cpp,MISRA-C++-2023,RULE-18-5-1,Yes,Advisory,Undecidable,System,A noexcept function should not attempt to propagate an exception to the calling function,,,Import,
cpp,MISRA-C++-2023,RULE-18-5-2,Yes,Advisory,Decidable,Single Translation Unit,Program-terminating functions should not be used,,,Easy,
cpp,MISRA-C++-2023,RULE-19-0-1,No,Required,Decidable,Single Translation Unit,A line whose first token is # shall be a valid preprocessing directive,,,,
cpp,MISRA-C++-2023,RULE-19-0-2,Yes,Required,Decidable,Single Translation Unit,Function-like macros shall not be defined,,,Import,
cpp,MISRA-C++-2023,RULE-19-0-3,Yes,Advisory,Decidable,Single Translation Unit,#include directives should only be preceded by preprocessor directives or comments,,,Import,
cpp,MISRA-C++-2023,RULE-19-0-4,Yes,Advisory,Decidable,Single Translation Unit,#undef should only be used for macros defined previously in the same file,,,Easy,
cpp,MISRA-C++-2023,RULE-19-1-1,Yes,Required,Decidable,Single Translation Unit,The defined preprocessor operator shall be used appropriately,,,Easy,
cpp,MISRA-C++-2023,RULE-19-1-2,No,Required,Decidable,Single Translation Unit,"All #else, #elif and #endif preprocessor directives shall reside in the same file as the #if, #ifdef or #ifndef directive to which they are related",,,,
cpp,MISRA-C++-2023,RULE-19-1-3,Yes,Required,Decidable,Single Translation Unit,All identifiers used in the controlling expression of #if or #elif preprocessing directives shall be defined prior to evaluation,,,Import,
cpp,MISRA-C++-2023,RULE-19-2-1,Yes,Required,Decidable,Single Translation Unit,Precautions shall be taken in order to prevent the contents of a header file being included more than once,,,Easy,
cpp,MISRA-C++-2023,RULE-19-2-2,Yes,Required,Decidable,Single Translation Unit,"The #include directive shall be followed by either a <filename> or ""filename"" sequence",,,Easy,
cpp,MISRA-C++-2023,RULE-19-2-3,Yes,Required,Decidable,Single Translation Unit,"The ' or "" or \ characters and the /* or // character sequences shall not occur in a header file name",,,Import,
cpp,MISRA-C++-2023,RULE-19-3-1,Yes,Advisory,Decidable,Single Translation Unit,The # and ## preprocessor operators should not be used,,,Import,
cpp,MISRA-C++-2023,RULE-19-3-2,Yes,Required,Decidable,Single Translation Unit,A macro parameter immediately following a # operator shall not be immediately followed by a ## operator,,,Import,
cpp,MISRA-C++-2023,RULE-19-3-3,Yes,Required,Decidable,Single Translation Unit,The argument to a mixed-use macro parameter shall not be subject to further expansion,,,Import,
cpp,MISRA-C++-2023,RULE-19-3-4,Yes,Required,Decidable,Single Translation Unit,Parentheses shall be used to ensure macro arguments are expanded appropriately,,,Medium,
cpp,MISRA-C++-2023,RULE-19-3-5,Yes,Required,Decidable,Single Translation Unit,Tokens that look like a preprocessing directive shall not occur within a macro argument,,,Import,
cpp,MISRA-C++-2023,RULE-19-6-1,Yes,Advisory,Decidable,Single Translation Unit,The #pragma directive and the _Pragma operator should not be used,,,Easy,
cpp,MISRA-C++-2023,RULE-21-2-1,Yes,Required,Decidable,Single Translation Unit,"The library functions atof, atoi, atol and atoll from <cstdlib> shall not be used",,,Import,
cpp,MISRA-C++-2023,RULE-21-2-2,Yes,Required,Decidable,Single Translation Unit,"The string handling functions from <cstring>, <cstdlib>, <cwchar> and <cinttypes> shall not be used",,,Easy,
cpp,MISRA-C++-2023,RULE-21-2-3,Yes,Required,Decidable,Single Translation Unit,The library function system from <cstdlib> shall not be used,,,Easy,
cpp,MISRA-C++-2023,RULE-21-2-4,Yes,Required,Decidable,Single Translation Unit,The macro offsetof shall not be used,,,Import,
cpp,MISRA-C++-2023,RULE-21-6-1,Yes,Advisory,Undecidable,Single Translation Unit,Dynamic memory should not be used,,,Easy,
cpp,MISRA-C++-2023,RULE-21-6-2,Yes,Required,Decidable,Single Translation Unit,Dynamic memory shall be managed automatically,,,Easy,
cpp,MISRA-C++-2023,RULE-21-6-3,Yes,Required,Decidable,Single Translation Unit,Advanced memory management shall not be used,,,Medium,
cpp,MISRA-C++-2023,RULE-21-6-4,Yes,Required,Decidable,System,"If a project defines either a sized or unsized version of a global operator delete, then both shall be defined",,,Import,
cpp,MISRA-C++-2023,RULE-21-6-5,Yes,Required,Decidable,Single Translation Unit,A pointer to an incomplete class type shall not be deleted,,,Import,
cpp,MISRA-C++-2023,RULE-21-10-1,Yes,Required,Decidable,Single Translation Unit,The features of <cstdarg> shall not be used,,,Easy,
cpp,MISRA-C++-2023,RULE-21-10-2,Yes,Required,Decidable,Single Translation Unit,The standard header file <csetjmp> shall not be used,,,Easy,
cpp,MISRA-C++-2023,RULE-21-10-3,Yes,Required,Decidable,Single Translation Unit,The facilities provided by the standard header file <csignal> shall not be used,,,Import,
cpp,MISRA-C++-2023,RULE-22-3-1,Yes,Required,Decidable,Single Translation Unit,The assert macro shall not be used with a constant-expression,,,Easy,
cpp,MISRA-C++-2023,RULE-22-4-1,Yes,Required,Decidable,Single Translation Unit,The literal value zero shall be the only value assigned to errno,,,Easy,
cpp,MISRA-C++-2023,RULE-23-11-1,Yes,Advisory,Decidable,Single Translation Unit,The raw pointer constructors of std::shared_ptr and std::unique_ptr should not be used,,,Easy,
cpp,MISRA-C++-2023,RULE-24-5-1,Yes,Required,Decidable,Single Translation Unit,The character handling functions from <cctype> and <cwctype> shall not be used,,,Easy,
cpp,MISRA-C++-2023,RULE-24-5-2,Yes,Required,Decidable,Single Translation Unit,"The C++ Standard Library functions memcpy, memmove and memcmp from <cstring> shall not be used",,,Easy,
cpp,MISRA-C++-2023,RULE-25-5-1,Yes,Required,Decidable,Single Translation Unit,The setlocale and std::locale::global functions shall not be called,,,Easy,
cpp,MISRA-C++-2023,RULE-25-5-2,Yes,Mandatory,Decidable,Single Translation Unit,"The pointers returned by the C++ Standard Library functions localeconv, getenv, setlocale or strerror must only be used as if they have pointer to const-qualified type",,,Import,
cpp,MISRA-C++-2023,RULE-25-5-3,Yes,Mandatory,Undecidable,System,"The pointer returned by the C++ Standard Library functions asctime, ctime, gmtime, localtime, localeconv, getenv, setlocale or strerror must not be used following a subsequent call to the same function",,,Import,
cpp,MISRA-C++-2023,RULE-26-3-1,Yes,Advisory,Decidable,Single Translation Unit,std::vector should not be specialized with bool,,,Import,
cpp,MISRA-C++-2023,RULE-28-3-1,Yes,Required,Undecidable,System,Predicates shall not have persistent side effects,,,Easy,
cpp,MISRA-C++-2023,RULE-28-6-1,Yes,Required,Decidable,Single Translation Unit,The argument to std::move shall be a non-const lvalue,,,Easy,
cpp,MISRA-C++-2023,RULE-28-6-2,Yes,Required,Decidable,Single Translation Unit,Forwarding references and std::forward shall be used together,,,Import,
cpp,MISRA-C++-2023,RULE-28-6-3,Yes,Required,Decidable,Single Translation Unit,An object shall not be used while in a potentially moved-from state,,,Import,
cpp,MISRA-C++-2023,RULE-28-6-4,Yes,Required,Decidable,Single Translation Unit,"The result of std::remove, std::remove_if, std::unique and empty shall be used",,,Easy,
cpp,MISRA-C++-2023,RULE-30-0-1,Yes,Required,Decidable,Single Translation Unit,The C Library input/output functions shall not be used,,,Import,
cpp,MISRA-C++-2023,RULE-30-0-2,Yes,Required,Undecidable,System,Reads and writes on the same file stream shall be separated by a positioning operation,,,Import,