Skip to main content

.deepsource.toml

This file must be present in the root of the repository for analysis to be run.
.
├── .deepsource.toml
├── README.md
├── bar
│   └── baz.py
└── foo.py
The configuration is written in the TOML format.

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.
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

  • Type: Array of Tables
  • Presence: mandatory
  • Description: List of analyzers. For each analyzer that has to be enabled for this repo, an entry has to be added to the analyzers table. Refer to analyzer specific configuration docs for available options.
  • Example:
[[analyzers]]
name = "python"
enabled = true
dependency_file_paths = [
  "requirements.txt",
  "Pipfile"
]
The configuration must have at least one valid Analyzer enabled for the analysis to run.

code_formatters

  • Type: Array of Tables
  • Presence: mandatory
  • Description: List of code formatters. For each code formatter that has to be enabled for this repo, an entry has to be added to the code_formatters table. Refer to code formatter-specific configuration docs for available options.
  • Example:
[[code_formatters]]
name = "black"
enabled = true
The configuration key code_formatters replaces the legacy transformers key. Both keys are supported for backward compatibility.