Supported Analyzer Rules

ipt has a list of analyzer rules builtin which can be used with ipt analyze.

Some explanation about the short details for each rule:

Rule name

The build in rule name that is always printed alongside the error messages and is used to select the analysis rule.

Features

The list of all features this rule supports. For a detailed description see Supported Linter rules. none, if no features are supported.

You can use the same methods of including/excluding certain analyzer rules like for linting rules.

Analyze used operations

Rule name

AnalyzeUsedOperations

Features

none

This rule searches for all used operation names and return the list at the end as information messages. The list includes the name of the operation and the number of uses and is sorted in decending order of use.

This rule ignores any file that has ipt compilation errors and can have function calls if its indistinguishable to an operation by structure.

example.ipf
Function test()
    variable i
    Make/N=10 wv

    for(i = 0; i < 10; i++)
        print i
        wv[i] = 1
    endfor

    print wv
End
ipt analyze –include AnalyzeUsedOperations example.ipf
ipt: info: 2 print
ipt: info: 1 make

Note

ipt will also include some function calls that look similar to operations by structure and mark them in the output with a trailing *. This is due to the way our parsing strategy works, and we plan to mitigate it somewhere in the future.