The rule to check if all calls in the code uses named parameters The syntax in a configuration file is::
[ruleType] ?not? namedParams
- ruleType is the type of rule which will be executed. Proper values are: check, search, count and fix. For more information about the types of rules, please refer to the program's documentation. Check type will raise an error if there is a call which doesn't have all parameters named. Search type will list all calls which set all their parameters as named and raise error if nothing was found. Count type will simply list the amount of calls which set all their parameters as named. Fix type will execute the default shell command set by the program's setting fixCommand.
- optional word not means negation for the rule. Adding word not will change to inform only about calls which have some parameters not named.
Disabling the rule
It is possible to disable the rule for a selected part of the checked code by using pragma ruleOff: "namedParams" before the code's fragment which shouldn't be checked.
To enable the rule again, the pragma ruleOn: "namedParams" should be added before the code which should be checked.
Examples
Check if all calls in module set their parameters as named::
check namedParams
Search for all calls which don't set their parameters as named::
search not namedParams