|
| 1 | +val rules = @{ |
| 2 | + Abstract_Type_Declarations, |
| 3 | + Anonymous_Arrays, |
| 4 | + Anonymous_Subtypes, |
| 5 | + Blocks, |
| 6 | + |
| 7 | + Boolean_Relational_Operators, |
| 8 | + # Flag each call to a predefined relational operator |
| 9 | + # (<, >, <=, >=, = and /=) for the predefined Boolean type. |
| 10 | + |
| 11 | + Complex_Inlined_Subprograms: {N: 3}, |
| 12 | + # Flag a subprogram (or generic subprogram, or instantiation of a |
| 13 | + # subprogram) if pragma Inline is applied to it and at least one of the |
| 14 | + # following conditions is met: |
| 15 | + # * it contains at least one complex declaration such as a subprogram |
| 16 | + # body, package, task, protected declaration, or a generic instantiation |
| 17 | + # (except instantiation of Ada.Unchecked_Conversion); |
| 18 | + # * it contains at least one complex statement such as a loop, a case or |
| 19 | + # an if statement; |
| 20 | + # * the number of statements exceeds 3 |
| 21 | + |
| 22 | + Controlled_Type_Declarations, |
| 23 | + |
| 24 | + Deep_Inheritance_Hierarchies: {N: 5}, |
| 25 | + # Flag a tagged derived type declaration or an interface type declaration |
| 26 | + # if its depth (in its inheritance hierarchy) exceeds 5 |
| 27 | + |
| 28 | + Deeply_Nested_Generics: {N: 3}, |
| 29 | + # Flag a generic declaration nested in another generic declaration if the |
| 30 | + # nesting level of the inner generic exceeds 3 |
| 31 | + |
| 32 | + Identifier_Casing: {Others: "mixed"}, |
| 33 | + # Flag any defining identifier if it casing does not follow the rules: the |
| 34 | + # first letter and every letter after underscore are uppercase, all the |
| 35 | + # other lettres are lowercase |
| 36 | + |
| 37 | + Identifier_Suffixes: { |
| 38 | + Type_Suffix: "_Type", |
| 39 | + Access_Suffix: "_Access_Type", |
| 40 | + Class_Access_Suffix: "_Class_Type" |
| 41 | + }, |
| 42 | + # Flag any defining identifier if it corresponds to the given kind of |
| 43 | + # entities but does not have a specified suffix |
| 44 | + |
| 45 | + Identifier_Prefixes: { |
| 46 | + Type: "T_", |
| 47 | + Access: "A_", |
| 48 | + Constant: "C_" |
| 49 | + }, |
| 50 | + # Flag any defining identifier if it corresponds to the given kind of |
| 51 | + # entities but does not have a specified prefix |
| 52 | + |
| 53 | + Non_Qualified_Aggregates, |
| 54 | + Non_Short_Circuit_Operators, |
| 55 | + |
| 56 | + OTHERS_In_Aggregates, |
| 57 | + OTHERS_In_CASE_Statements, |
| 58 | + OTHERS_In_Exception_Handlers, |
| 59 | + |
| 60 | + Warnings: "km", |
| 61 | + # Include warnings generated by the compiler with '-gnatwk' (variables that |
| 62 | + # could be constants) and '-gnatwm' (modified but unreferenced variables) |
| 63 | + # into generated gnatcheck report |
| 64 | + |
| 65 | + Style_Checks: "uO", |
| 66 | + # Include warnings generated by the compiler style checks '-gnatyu' |
| 67 | + # (unnecessary blank lines) and '-gnatyO' (overriding subprograms are |
| 68 | + # not explicitly marked as such.) into generated gnatcheck report |
| 69 | + |
| 70 | + Restrictions: {Arg: ["No_Allocators", "No_Tasking", "No_Dependence => Ada.Containers"]} |
| 71 | + # Include warnings generated by the compiler with the specified restrictions |
| 72 | + # into generated gnatcheck report |
| 73 | +} |
0 commit comments