Steps to navigate to Scan Configuration Option:
- Click on Projects option on the left side navigation pane.
- Inside your project, click on a repository and then click on three dots “…” on the top right corner. Select the Scan configuration option.
Scan Configuration window consists of:
- Additional Options
- To filter out files containing “test” keyword -> “.*test.*”
- To filter out everything but one file -> “^(?!.*parse-this-file-only.cpp*$).*”
- Use escape character to match special characters like +, . -> “.*test.c++*”
- Parsing invalid code:
By default, invalid code parsing is enabled but, it can be disabled using the following option.
- Recursive include header search
By default, the parser searches for any header file recursively in all the sub-directories of the source folder. This can lead to incorrect results if there are multiple header files with the same name but in different folders.
To disable searching in all sub-directories use the following option
- Define macros
Macros can be defined with GCC like option format.
Example: To define macro MY_MACRO -> –clang=”-DMY_MACRO=”
Any option to compiler can be given with –clang=””
- A comma-separated list of regular expressions should be added in Scan Configuration pop-up window >> inclusion
- Look for Includes label and upload zip of include files.
- Click Save.