Enforcement parametersThe enforcement of quality and style guidelines is highly customizable. For example, say your project leader decides that goto statements should not be reported as errors. Command set-enforcement-parameters (menu: Options/Enforcement Preferences/Set) allows you to change which guidelines are enforced.
You should still have one goto statement in your program. If you do not, then create one in the *untitled* buffer.
Invoke set-enforcement-parameters.
Find the line that reads GOTO ENFORCEMENT and
click on the on to its right. Now select
Off from the Transform menu.
The new guideline does not take effect immediately, but only when you invoke the command use-enforcement-parameters (menu: Options/Enforcement Preferences/Use).
Arrange the windows so that the *untitled* window is in the
foreground, and invoke use-enforcement-parameters.
Note that the error message associated with the goto statement disappears.
Ada-ASSURED allows the use of certain identifiers in certain contexts to be flagged as errors. For example, say a project wishes to forbid the use of the identifier X anywhere.
Scroll the window containing the enforcement parameters down until
you reach the section labelled VIOLATIONS FOR SELECTED
IDENTIFIERS.
Position the insertion cursor on the word
Context, (several lines below)
and strike RETURN until the word
anywhere appears beneath the word Context. Select
the placeholder to the right of that. Type X and strike
RETURN. Then invoke use-enforcement-parameters.
Note that a new violation message appears in the Ada program. This feature is useful for finding identifiers whose use is considered erroneous. For example, it can be used to forbid use of identifiers that have become keywords in Ada 95.
There are two levels of style enforcement provided: Violations and Indicators, where indicators are considered to be less severe than violations. As delivered, indicators appear only in the MESSAGES view and not in-line.