This document gives you a brief overview of the custom policy creation process.
ALINT GUI features all of the necessary tools for convenient creation of custom policies.
Start the tool in the GUI mode by executing the runalint command
Select File | New | Policy File to create a new policy
Once you create a new policy, the tool automatically switches to the Policy perspective with all necessary windows activated (Figure 1).
Figure 1: Policy Perspective
Rule Plug-in Viewer is the main tool that is showing the design rules installed.
The rules are grouped and displayed by several predefined classifications, and can be also viewed as a flat list. Design Methodology Topics is the default classification (Figure 2).
The current selected rule or group of rules can be added to the current policy by using the regular drag-n-drop method, or hitting Space (default hotkey associated with this action).
The context-dependent rule reference is displayed in the Rule Description Viewer. It typically includes a short description of the rule, information on how to fix the problem, and a source code example.
Figure 2: Default Grouping by Plug-in Name
By default, rules are grouped so that you can see them by plug-in name (Figure 2). But, you may want to abstract from plug-ins and review rules from a more generic perspective, especially in when you have several plug-ins. Use the Merge Classifications function in such case (Figure 3 is an example of merged classification).
Figure 3: Merged Classification
Once a rule is added to a policy file, it can be customized via the configurable parameters. To create a custom configuration for a rule, right-click the rule, and select the Configure Rule option. Custom rules configurations appear in the Rule Configurations section at the bottom of the policy file (Figure 4).
Figure 4: Rule Configuration Section
Once the custom configuration is created for a rule, this rule’s parameters can be modified. The list of parameters that are available for the current selected rule is displayed in the Rule Parameter Editor (Figure 5).
Figure 5: Modified Parameters Appearance
There are several possible parameter types, including a dropdown list, numeric value, regular expression, string, and a list of strings. Double-click on the default parameter value to override it. Modified parameters are highlighted.
A custom policy can be used as soon as it is saved to an .alintpolicy file. The name of the policy file matches the policy name, and therefore must consist of alphanumeric symbols only. Depending on the tool operation mode you are in, there are several ways to make a custom policy visible for the linting session:
GUI: the default policy search path is set to the active design directory and tool installation folder. Use Tools | Preferences | Linting | Entries | Policy directories to specify an alternative global policy search path.
Script/batch: default policy search path is set to the current working directory and tool installation folder. Use the -alint_policy_path switch to specify a custom policy search path if necessary – see User’s Guide | Macro Command Reference | alint command for details.