Documentation

Doc index page

Ignore a specific directoryΒΆ

SensioLabsInsight analyses all the files of your project, but it excludes by default the following directories, commonly used to store tests and third-party libraries:

  • vendor/
  • vendors/
  • test/
  • tests/
  • Tests/
  • spec/
  • features/
  • Fixtures/
  • DataFixtures/
  • var/

In case you need to exclude other files or directories for a specific project, follow these steps:

1 Click on the Edit project link at the top right of a project or analysis page.

2 Copy and paste the following code in the Configuration option and append the paths to your excluded files and directories:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
global_exclude_dirs:
    - vendor
    - vendors
    - test
    - tests
    - Tests
    - spec
    - features
    - Fixtures
    - DataFixtures
    - var

If you need for instance to exclude the legacy/ directory and the config/params.php file, the resulting configuration will be as follows:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
global_exclude_dirs:
    - vendor
    - vendors
    - test
    - tests
    - Tests
    - spec
    - features
    - Fixtures
    - DataFixtures
    - var
    - legacy/
    - config/params.php

If you want to completely override the directories that Insight excludes by default, add an empty global_exclude_dirs configuration option.

3 Click on the Update button and the changes will take effect in the next analysis.