MessagesAda-ASSURED reports three kinds of standards enforcement message:
The text of the diagnostic messages can be customized by using the scripting language function sg:change-diagnostic-message!.
Syntactic categories: name_start.
Reference: Ada LRM 4.5.
The user has attempted to use a non-valid string literal as a function designator. Valid function designators are listed in Section 4.5 of the Ada LRM.
Syntactic categories: parameter_specification.
Reference: Ada LRM 6.1.
A parameter with an optional initialization clause can only be an in parameter. Any other mode will cause this error message.
Syntactic categories: statement_list.
Reference: Ada LRM 5.
This message appears if a statement list contains no valid statements. For example, if all the lines in the statement list are comments.
Syntactic categories: statement_list.
Reference: Ada LRM 5.
This message appears if all the lines in the statement list are pragmas.
Syntactic categories: declaration_list.
Reference: Ada LRM 3.9.
An attempt has been made to put a representation clause, object declaration, type declaration, exception declaration, or renaming declaration after a subprogram body. Note, this error only applies to the Ada 83 product; the restriction has been removed in Ada 95.
Syntactic categories: is_entry_list.
Reference: Ada LRM 9.1.
In a task specification, the user has put an entry declaration after a representation clause. Note, this error only applies to the Ada 83 product; the restriction has been removed in Ada 95.
Syntactic categories: generic_instantiation.
Reference: Ada LRM 12.1.
The user has put a formal part in a generic instantiation.
Syntactic categories: association_list.
A character literal has been used as an association name. For example, pragma Foo('a' => x);
Syntactic categories: association, component_association.
Reference: Ada LRM 2.8, 4.3 and 6.4.
A positional association item has occurred after a named association.
Syntactic categories: association, component_association.
Reference: Ada LRM 2.8, 4.3 and 6.4.
A qualified name has been used as an association name. For example, pragma Foo(a.b => x);
Syntactic categories: name.
Reference: Ada LRM 4.7.
Self explanatory. For example, it appears in the following
expression:
A'(X => Y).Z
Syntactic categories: aggregate.
Reference: Ada LRM 4.3.
Self explanatory. For example, it appears in the following enumeration representation clause: for x use (a);
Syntactic categories: aggregate.
Reference: Ada LRM 4.3.
Self explanatory. For example, it appears in the following
declaration:
A : X (Y, 1..2);
Syntactic categories: aggregate.
Reference: Ada LRM 4.3.
This message appears when a range appears in an illegal context. For example, in the following procedure call: P(1 .. 2);
Syntactic categories: aggregate.
Reference: Ada LRM 4.1.2.
An aggregate in the context of a slice has more than one discrete range. For example, in the following expression: X(1 .. 2, 3 .. 4).P
Syntactic categories: aggregate.
Reference: Ada LRM 4.3.
An aggregate in the context of a slice has a component that is not a slice. For example, in the following expression: X(1 .. 2, Y).P
Syntactic categories: component_association, choice_list.
Reference: Ada LRM 4.3 and 6.4.
A component in a named association has more than one choice on the left hand side of the =>. For example, in the following statement: P(A | B => C);
Syntactic categories: component_association, choice_list.
Reference: Ada LRM 4.3 and 6.4.
A component has a non-simple name, such as a slice as a choice on the left hand side of the =>. For example, in the following statement: P(1 .. 2 => A);
Syntactic categories: expression.
Reference: Ada LRM 2.4.2.
In a based literal, the base value is outside the range 2 through 16. For example, in the following expression:
19#1_234#
Syntactic categories: expression.
Reference: Ada LRM 2.4.2.
In a based literal, there are digits in the mantissa that are invalid for the base. For example, in the following expression:
2#10_2010#
Syntactic categories: component_list.
Reference: Ada83 LRM 3.7. Ada95 LRM 3.8.
A component list must include at least one real component. This message appears when there are none. For example, in the following record declaration:
type R is record -- one two end record;
Syntactic categories: component_list.
Reference: Ada83 LRM 3.7, Ada95 LRM 3.8.
A component list must include at least one real component. This message appears when there only pragmas in the list. For example, in the following record declaration:
type R is record pragma Q; end record;
Syntactic categories: range.
Reference: Ada LRM 3.5.
This message is self explanatory. For example, it will appear for the following expression: 1 in 2
Syntactic categories: range, range_constraint, component_clause.
Reference: Ada95 LRM 3.5.
A range in a range_constraint or a component_clause may not be a simple name. This message appears if so. For example: type F is delta Y range R;
Syntactic categories: optional_is_name, length_clause, component_clause, type_mark, range, statement (assignment), renaming_declaration, entry_call.
Reference: Ada LRM 4.1.
A name in any of the above categories must not be a qualified expression. If a qualified expression is detected, this message will appear. For example, in the following assignment statement: A'(B) := X;
Syntactic categories: length_clause, representation_clause.
Reference: Ada83 LRM 13.2, Ada95 LRM 13.3.
An invalid name has been used in a representation length-clause. The name must be an attribute. For example: for X use Y;
Syntactic categories: association.
Reference: Ada83 LRM 2.8, 3.7, 4.3, 5.4, 6.4, 9.7.1, 11.2, and 12.3;
Ada95 LRM 3.8.
A name in an association must not be an attribute or a qualified expression. This message appears if so. For example: pragma P(A'B => X);
Syntactic categories: allocator.
Reference: Ada LRM 4.8.
Structural cutting and pasting can result in what was parsed as a name in the context of a qualified expression. Text-capturing and re-parsing the name, or invoking the transformation convert-to-subtype will correct the problem.
Syntactic categories: parameter_specification_list
Reference: Ada95 LRM 6.1.
This message appears if the parameter specification list consists solely of comments and blank lines. For example:
procedure P (--one );
Syntactic categories: enumeration_literal_specification_list.
Reference: Ada LRM 3.5.1.
This message appears if the enumeration specification list consists solely of comments and blank lines. For example:
type X is (--one );
Syntactic categories: identifier_list.
Reference: Ada83 LRM 3.2, 3.7 3.7.1, 6.1, 7.4, 11.1, and 12.1. Ada95 LRM 3.3.1, 3.3.2, 3.7, 3.8, 6.1, 11.1, and 12.4.
This message appears if the identifier list consists solely of comments and blank lines. For example:
procedure P (--one : in Y);
Syntactic categories: component_association_list.
Reference: Ada LRM 4.3.
This message appears if the component association list consists solely of comments and blank lines. For example, in the following statement:
P(--one );
Syntactic categories:
compilation_unit_list,
context_clause_list,
exception_handler_list,
generic_formal_part,
optional_component_clause_list,
association_list,
pragma_choice_list,
component_list,
basic_declaration_list,
component_association_list,
statement_list,
parameter_specification_list,
is_entry_list,
protected_operation_item_list (Ada95 only).
Reference: N/A.
This message appears if the text bracketed by freeform-text comments cannot be parsed.
Syntactic categories: protected_body (Ada95 only).
Reference: Ada95 LRM 9.4.
The protected operation item list consists solely of comments and blank lines.
A syntax error was found somewhere in the text of the file. Further analysis of the contents is not possible until this has been corrected.
Syntactic categories: name, identifier.
Enforcement parameters:
Violations For Selected Identifiers,
Identifiers To Be Flagged As Violations.
Reference: AQ&S 3.1.4, 5.9.1, 5.9.2, 5.9.7, 6.2.2, 6.2.3, 7.2.1, 7.4.3, 7.5.2, 7.5.3, 7.6.2, 7.6.4, 7.6.5, 7.6.7, 7.6.6, 7.7.1, 7.7.4, 8.4.2.
If Violations For Selected Identifiers is on and if identifier <id> appears in context <context>, then this message will appear.
Syntactic categories: component_association_list, association_list.
Enforcement parameters:
Named Association For Instantiations,
Named Association For Names,
Named Association For Aggregates,
Named Association For Pragmas.
Reference: AQ&S 5.2.2, 5.6.10.
If any of the items in the list use positional notation, and the number of items in the list exceeds the parameter appropriate for the context in which the list is found, then this message is printed. Clicking on the message enables the transformation convert-list-to-named.
Syntactic categories: generic_instantiation, association.
Enforcement parameters:
Named Association For Instantiations,
Named Association For Names,
Named Association For Aggregates,
Named Association For Pragmas.
Reference: AQ&S 5.2.2, 5.6.10.
If the named association threshold is one, and there is only one item in the list, this message is printed rather than violation message V1.
Syntactic categories: statement (if, case), optional_else.
Enforcement parameters:
Marker Comment Loc,
Marker Comment Nest Level,
Else Marker Comment Loc,
Else Marker Comment Nest Level.
Reference: AQ&S 3.3.7.
If statements and case statements consisting of more than Marker Comment Loc lines of code (loc) or more than Marker Comment Nest Level nesting levels of code require a marker comment on their end if or end case. If statements consisting of more than Else Marker Comment Loc lines of code (loc) or more than Else Marker Comment Nest Level nesting levels require a marker comment on their else.
Syntactic categories: statement.
Enforcement parameters: Goto enforcement.
Reference: AQ&S 5.6.7.
If the enforcement parameter is on, then this message appears for every occurrence of a goto statement.
Syntactic categories: statement.
Enforcement parameters: Goto enforcement.
Reference: AQ&S 5.6.7.
If the enforcement parameter is on, then this message appears for every occurrence of a statement that has a label.
Syntactic categories: task_body.
Enforcement parameters: Others Handlers in Tasks Enforcement.
Reference: AQ&S 6.3.4.
If the enforcement parameter is on, then this message appears when a task body does not have an others exception handler present.
Syntactic categories: statement (loop).
Enforcement parameters: Nested Loop Naming Enforcement.
If the enforcement parameter is on, then all nested loops must be named. This message will appear for each occurrence of a nested loop.
Syntactic categories: statement (exit).
Enforcement parameters: Nested Loop Naming Enforcement.
If the enforcement parameter is on, then if a loop is required to be named, then any exit statements within the loop must also be named.
Syntactic categories: with_clause, component_declaration, object_declaration (objects, constants, numbers) discriminant_specification, declaration (exceptions), parameter_specification, use_clause.
Enforcement parameters: Single Identifier List Enforcement.
Reference: none.
If the enforcement parameter is on, then identifier lists in each of the above syntactic categories must contain no more than one identifier per clause. Clicking on the message will enable the transformation convert-to-singleton which can be used to correct the violation.
Syntactic categories: statement (block).
Enforcement parameters: Block Naming Enforcement.
Reference: AQ&S 5.1.2.
If the enforcement parameter is on, then this message will appear for all blocks that are unnamed.
Syntactic categories: task_specification.
Enforcement parameters: Anonymous Task Type Enforcement.
Reference: AQ&S 6.1.3.
If the enforcement parameter is on, then anonymous tasks are disallowed. Clicking on the message enables the transformation insert-type which can be used to correct the violation.
Syntactic categories: package_declaration, declaration (object, array).
Enforcement parameters: Exported Variable Enforcement.
Reference: AQ&S 4.1.7.
If the enforcement parameter is on, then this message will appear for all variable declarations in the visible part of a package specification. For example:
package P is
--VIOLATION-- Non-constant object declarations are
--VIOLATION-- not permitted in the visible part of
--VIOLATION-- a package specification.
A : B;
end P;
Syntactic categories: optional_constraint, declaration (array, constant array).
Enforcement parameters: Anonymous Type Enforcement.
Reference: AQ&S 5.3.2.
If the enforcement parameter is on, then this message appears for all occurrences of anonymous types. An anonymous type is defined as an inline declaration of an array.
Syntactic categories: parameter_specification_list.
Enforcement parameters: Parameter Order Enforcement.
Reference: AQ&S 5.2.3.
If the enforcement parameter is on, then parameter specifications are required to be sorted by mode. The required order is in, in out, out and finally in parameters with default values.
Syntactic categories: subprogram_body, package_body, task_body
Enforcement parameters: Control Nesting Depth.
Reference: AQ&S 5.6.1.
This message appears for every body that has a nesting depth greater than the value of the enforcement parameter. The nesting depth of a body is defined as the maximum nest level of any statement or optional exception part in the body, where the nest level of a statement is defined recursively as follows: If the statement encloses another statement_list, then the nest level of the statement is 1 + the maximum nest level of any enclosed statement. Otherwise, the nest level is zero. The nest level of an optional exception part is 1 + the maximum nest level of any enclosed statement.
Syntactic categories: expression.
Enforcement parameters: Expression Nesting Depth.
Reference: AQ&S 5.6.1.
This message appears for every top level expression that has a nesting depth greater than the enforcement parameter. The nesting depth of an expression, where that expression is an arithmetic or logical expression, is defined as the maximum nest level of any subexpression contained within the expression. The nest level of an expression is defined recursively as follows: If the expression has no subexpression, its nest level is zero. Otherwise, if the precedence of the expression is not equal to the precedence of any of its subexpressions, then its nest level is 1 + the maximum nest level of all of its subexpressions.
Syntactic categories: subprogram_body.
Enforcement parameters: Subprogram Body Size.
Reference: none.
This message appears for every subprogram body whose body size exceeds the value of the enforcement parameter. Sizes are measured in terms of lines of code. The size of a subprogram body is defined as: the size of the header and parameter specification part + the size of the declaration part + the size of the begin-end part.
Syntactic categories: task_body.
Enforcement parameters: Task Body Size.
Reference: none.
This message appears for every task body whose body size exceeds the value of the enforcement parameter. Sizes are measured in terms of lines of code. The size of a subprogram body is defined as: 1 + the size of the declaration part + the size of the begin-end part.
Syntactic categories: expression.
Enforcement parameters: Negative Logic Occurrences.
Reference: AQ&S 5.5.4.
This message appears for every top level expression whose negative logic exceeds the enforcement parameter. The negative logic of an expression is recursively defined as follows: The negative logic of a not or not in expression is 1 + the negative logic of its subexpression. The negative logic of any other expression is the maximum of the negative logic of all its subexpressions.
Syntactic categories: task_declaration.
Enforcement parameters: Exported Task Enforcement.
Reference: AQ&S 4.2.4.
This message is self-explanatory.
Syntactic categories: parameter_specification_list.
Enforcement parameters: Parameter Order Enforcement.
Reference: AQ&S 5.2.3.
If the enforcement parameter is on, this message appears if the parameter specification list contains in parameters without default expressions occurring after in parameters with default expressions.
Syntactic categories: compilation_unit_list.
Enforcement parameters: Separate Compilation Unit Enforcement.
Reference: AQ&S 4.1.1.
If the enforcement parameter is on, this message appears when more than one compilation unit occurs in a buffer.
Syntactic categories: identifier list.
Enforcement parameters: Commented Identifier Enforcement.
Reference: none.
If the enforcement parameter is on, this message appears when an identifier list has interleaved comments.
Syntactic categories: statement (loop).
Enforcement parameters: Unnamed Loops.
Reference: none.
This message appears for every occurrence of a loop whose size exceeds the value of the enforcement parameter.
Syntactic categories: statement (abort).
Enforcement parameters: Abort Enforcement.
Reference: AQ&S 6.3.3.
If the enforcement parameter is on, then this message appears for every occurrence of an abort statement.
Syntactic categories: type_declaration.
Enforcement parameters: Derived Type Enforcement.
Reference: none.
If the enforcement parameter is on, then this message appears for every occurrence of a derived type.
Syntactic categories: type_declaration.
Enforcement parameters: Access Type Enforcement.
Reference: none.
If the enforcement parameter is on, then this message appears for every occurrence of an access type.
Syntactic categories: All.
Enforcement parameters: Freeform Text Enforcement.
Reference: none.
This message appears if there is a use of freeform-text comments to escape from formatting.
Syntactic categories: protected_definition.
Enforcement parameters: Exported Protected Enforcement.
Reference: AQ&S 5.3.3.
This message is self-explanatory.
Syntactic categories: type_definition (protected type).
Enforcement parameters: Exported Protected Type Enforcement.
Reference: AQ&S 6.1.2.
This message is self-explanatory.
Syntactic categories: object_declaration, type_definition (constrained array).
Enforcement parameters: Aliased Object Enforcement.
Reference: AQ&S 5.4.4.
If the enforcement parameter is on, then this message appears for every occurrence of an aliased object.
Syntactic categories: name, identifier.
Enforcement parameters: Indicators For Selected Identifiers.
Reference: AQ&S 3.1.4, 5.9.1, 5.9.2, 5.9.7, 6.2.2, 6.2.3, 7.2.1, 7.4.3, 7.5.2, 7.5.3, 7.6.2, 7.6.4, 7.6.5, 7.6.7, 7.6.6, 7.7.1, 7.7.4, 8.4.2.
If Indicators For Selected Identifiers is on and if identifier <id> appears in context <context>, then this message will appear.
Syntactic categories: expression.
Enforcement parameters: Negative Logic Occurrences.
Reference: AQ&S 5.5.4.
This is the indicator form of violation V19.
Syntactic categories: expression.
Enforcement parameters: Expression Nesting Depth.
Reference: AQ&S 5.6.1.
This is the indicator form of violation V16.
Syntactic categories: subprogram_body, package_body, task_body.
Enforcement parameters: Control Nesting Depth.
Reference: AQ&S 5.6.1.
This is the indicator form of violation V15.
Syntactic categories: task_body.
Enforcement parameters: Task Body Size.
Reference: none.
This is the indicator form of violation V18.
Syntactic categories: subprogram_body.
Enforcement parameters: Subprogram Body Size.
Reference: none.
This is the indicator form of violation V17.
Syntactic categories: subprogram_body.
Enforcement parameters: Indicators For Code Statements.
Reference: AQ&S 7.6.3.
If the enforcement parameter is on, then the message appears if a code statement exists in the subprogram body.
Syntactic categories: package_body.
Enforcement parameters: Indicators For Code Statements.
Reference: AQ&S 7.6.3.
If the enforcement parameter is on, then the message appears if a code statement exists in the package body.
Syntactic categories: task_body.
Enforcement parameters: Indicators For Code Statements.
Reference: AQ&S 7.6.3.
If the enforcement parameter is on, then the message appears if a code statement exist in the task body.
Syntactic categories: exception_handler_list.
Enforcement parameters: Indicators For Others Handlers.
Reference: AQ&S 5.8.2.
If the enforcement parameter is on, then this message occurs if an others handler is present in an exception handler list.
Syntactic categories: task_specification.
Enforcement parameters: Indicators For Tasks.
Reference: none.
If the enforcement parameter is on, then this message appears when a task specification occurs.
Syntactic categories: generic_instantiation.
Enforcement parameters: Indicators For Generics.
Reference: none.
Self explanatory.
Syntactic categories: generic_instantiation.
Enforcement parameters: Indicators For Generics.
Reference: none.
Self explanatory.
Syntactic categories: type_definition, expression.
Enforcement parameters: Indicators For Dynamic Memory.
Reference: none.
Appears if an access type is defined.
Syntactic categories: type_definition, expression.
Enforcement parameters: Indicators For Dynamic Memory.
Reference: none.
Appears if an allocator occurs.
Syntactic categories: statement (abort).
Enforcement parameters: Indicators For Abort Statements.
Self explanatory.
Syntactic categories: representation_clause, address_clause, length_clause.
Enforcement parameters: Indicators For Representation Clauses.
Reference: AQ&S 7.6.1.
Self explanatory.
Syntactic categories: representation_clause, address_clause, length_clause.
Enforcement parameters: Indicators For Representation Clauses.
Reference: AQ&S 7.6.1.
Self explanatory.
Syntactic categories: representation_clause, address_clause, length_clause.
Enforcement parameters: Indicators For Representation Clauses.
Reference: AQ&S 7.6.1.
Self explanatory.
Syntactic categories: representation_clause, address_clause, length_clause.
Enforcement parameters: Indicators For Representation Clauses.
Reference: AQ&S 7.6.1.
Self explanatory.
Syntactic categories: pragma_clause.
Enforcement parameters: Indicators For Pragmas.
Reference: none.
Self explanatory
Syntactic categories: generic_instantiation.
Enforcement parameters: Indicators For Generics.
Reference: none.
Self explanatory.
Syntactic categories: generic_instantiation.
Enforcement parameters: Indicators For Generics.
Reference: none.
Self explanatory.
Syntactic categories: association_list, component_association_list.
Enforcement parameters:
Named Association For Instantiations,
Named Association For Names,
Named Association For Aggregates,
Named Association For Pragmas.
Reference: AQ&S 5.2.2, 5.6.10.
This is the indicator form of violation V1.
Syntactic categories: statement (loop).
Enforcement parameters: Unnamed Loops.
Reference: none.
This is the indicator form of violation V25.
Syntactic categories: statement (if, case), optional_else.
Enforcement parameters:
Marker Comment Loc,
Marker Comment Nest Level,
Else Marker Comment Loc,
Else Marker Comment Nest Level.
Reference: AQ&S 3.3.7.
This is the indicator form of violation V3.
Syntactic categories: statement (loop).
Enforcement parameters: Unnamed Loops.
Reference: AQ&S 5.6.4.