Configuration

The analysis configuration for a repository on DeepSource is defined in a .deepsource.toml file in the repository's root. This file must be present at the said location for analysis to be run.

.
├── .deepsource.toml
├── README.md
├── bar
│   └── baz.py
└── foo.py

The configuration is written in TOML. The example below is the exhaustive list of configuration options possible.

version

  • Type: Integer
  • Presence: mandatory
  • Description: The version property is required and must be set to 1, which is the only supported version at the moment.
  • Example:
version = 1

exclude_patterns

  • Type: Array
  • Presence: optional
  • Description: List of glob patterns that should be excluded when the analyses are run. These patterns should be relative to the repository's root.
  • Example:
exclude_patterns = [
  "bin/*",
  "**/node_modules/",
  "js/*/*.min.js"
]

test_patterns

  • Type: Array
  • Presence: optional
  • Description: List of glob patterns that should be marked as tests or containing test files. These patterns should be relative to the repository's root.
  • Example:
test_patterns = [
  "tests/",
  "test_*.py"
]

analyzers

[[analyzers]]
name = "python"
enabled = true
dependency_file_paths = [
  "requirements.txt",
  "Pipfile"
]

TIP

The configuration must have at least one valid analyzer enabled for analysis to run.