Login
paramsUsed rule
Login

The rule to check if the selected procedure uses all its parameter The syntax in a configuration file is:

[ruleType] ?not? paramsUsed [declarationType]

Disabling the rule

It is possible to disable the rule for a selected part of the checked code by using pragma ruleOff: "paramsUsed" in the declaration from which the rule should be disabled. For example, if the rule should be disabled for procedure main(), the full declaration of it should be:

proc main() {.ruleOff: "paramsUsed".}

To enable the rule again, the pragma ruleOn: "paramsUsed" should be added in the element which should be checked. For example, if the rule should be re-enabled for function myFunc(a: int), the full declaration should be:

func myFunc(a: int) {.ruleOn: "paramsUsed".}

Examples

  1. Check if all procedures in module uses their parameters:

    check paramsUsed procedures

  2. Search for all declarations which don't use their all parameters:

    search not paramsUsed all