Code patterns allow you to search for specific snippets within program source code or other files.
Adding a Code Pattern
To add a code pattern check, navigate to Checks in the left sidebar and use the New Check + button. Next, select the Code Pattern option in the drop-down and see the settings below:
A summary of what the code pattern is checking. Shown to users if task is live and checks are shared (which is the default).
The Ruby regular expression to search for.
The specific file(s) (relative to /home/nt-user/workspace) to search. Supports file globs. Defaults to all files (*). Limiting the files search is recommended if there are a large number of files to improve performance.
Optionally add some text to test your regular expression with.
A list of matches found in your test code.
If the regular expression should be case sensitive.
If disabled, the code pattern will pass when the pattern is NOT present in the code.