Skip to main content

File Exclusion From Analysis

To exclude files from analysis, use regular expressions. The following notation is used:

** - 0+ directories

* - 0+ symbols

? - 1 symbol

When analyzing an archive, please keep in mind that the archive is a root folder, therefore ** should be added in the beginning. To exclude a file, add a corresponding pointer to the expression. For 58 User Guide Chapter 5. Static Analysis instance, **/*; !**/*.spec.ts will remove from analysis all .spec.ts. To analyze only .ts but not module.ts, you can use **/*.ts; !**/*.module.ts.

Each expression should be separated by a ;.

Examples for regular expressions:

project/ 
├── main/
│ ├── src/
│ │ ├── config/
│ │ │ ├── somefile.some.ext
│ │ │ ├── somefile.other.ext
│ │ ├── somefile.ext
├── test/
│ ├── sometestfile.ext
├── somefile.txt

**/* - analyze all

**/main/* - analyze only 'main' folder; files for analysis:

project/main/src/config/somefile.some.ext

project/main/src/config/somefile.other.ext

project/main/src/somefile.ext

**/*; !**/*.ext - analyze all files, except ‘.ext’; files for analysis: project/somefile.txt

**/*.ext; !**/*.some.ext - analyze all '.ext' files, except '.some.ext'

('.other.ext' will be analyzed); files for analysis:

project/main/src/config/somefile.other.ext

project/main/src/somefile.ext

project/test/sometestfile.ext

project/somefile.txt

**/*.other.ext - analyze only ‘.other.ext’ files; files for analysis: project/main/src/config/somefile.other.ext

**/*; !**/sometestfile.ext - analyze all, except 'sometestfile.ext';

files for analysis:

project/main/src/config/somefile.some.ext

project/main/src/config/somefile.other.ext

project/main/src/somefile.ext

project/somefile.txt

**/*;!**/{name:.*[tT][eE][sS][tT].*};!**/{name:.*[tT][eE][sS][tT].*}/**/* - analyze all files, except the files that contain the word ‘test’, or the files that contain ‘test’ in their path

**/*;!**/Archive/**/*- analyze all files, except the contents of “Archive”

!**/* - analyze nothing