Limiting the files to be analyzed
Last updated
Last updated
There may be times when you may want to limit the files included in an analysis. A common use case would be when you are incorporating a large set of open source libraries into your code base. You may not wish to include those source code files in your analysis as you are not responsible for them. Or, once analyzed, you may not want them to be analyzed again in each subsequent analysis thus increasing your OBLoC count. iCR allows you to exclude those files from your analysis.
Use the Settings menu to select the Limit Analysis option. This will cause the Navigator to display all of your currently cloned source repositories. Click on the repository where you wish to exclude files or directories from the analysis. In our example, we are using the Baritone
repository. Clicking on that presents you with all of the available branches for that repository.
Select the branch for which you wish to exclude some files. We will use the master
branch for our example. Clicking on the master
branch displays the file hierarchy for that branch. If you had previously excluded files or directories, your previous selections will be shown with the boxes already marked. If not, or if you want to change your selection, click on the boxes adjacent to the directories or files that you want EXCLUDED from the analysis. All other files will be included.
NOTE: If you select a directory for exclusion all files below that directory in the file hierarchy will be excluded.
Once your selections are made, click on Apply to set your choices. Analyses performed following this setting will result in bugs not being detected nor fixes presented for potential issues within that excluded portion of your source.
You may follow the example in the video below to see how these steps are performed. In our example, we choose to exclude all of the test
source code.