Core analyzers
Configuration reference for all DeepSource analyzers, including code analysis, coverage, and vulnerability scanning.
This page documents the configuration options for every DeepSource analyzer. Each analyzer can be enabled and configured through the dashboard under Settings > Code Review — no configuration file is needed.
Dashboard configuration (default)
DeepSource auto-detects languages in your repository, and all analysis settings are managed through Settings > Code Review in the dashboard. No .deepsource.toml file is needed for new repositories.
TOML configuration (optional)
If your repository contains a .deepsource.toml file, DeepSource reads it and uses it to configure analysis. You can disable TOML-based configuration for a repository under Settings > Preferences.
Supported languages
| Analyzer | Supported versions | Status |
|---|---|---|
| Go | ≤1.26 | GA |
| Rust | ≤1.93 | GA |
| Java | 8–25 | GA |
| Scala | 2.x, 3.x | GA |
| C# | 1–14 | GA |
| JavaScript | Up to ES2025, TypeScript up to 6.0 | GA |
| PHP | 7.0–8.5 | GA |
| Python | 2.7, 3.x (up to 3.12) | GA |
| Ruby | 2.0–3.3 | GA |
| C & C++ | C99–C17, C++98–C++23 | GA |
| Swift | 5.1–5.9 | GA |
| Kotlin | 1.0–2.1 | GA |
| Docker | N/A | GA |
| Shell | N/A | GA |
| SQL | N/A | GA |
| Terraform | N/A | GA |
TOML file reference
If your repository contains a .deepsource.toml file, DeepSource reads it and uses it to configure analysis. The file supports the following top-level fields:
version
- Type: Integer
- Presence: mandatory
- Description: The version of the configuration file format. Currently, the only supported value is
1.
version = 1exclude_patterns
- Type: Array of Strings
- Presence: optional
- Description: Glob patterns to exclude files from analysis (e.g. test fixtures, generated code, vendor directories).
exclude_patterns = [
"migrations/**",
"**/examples/**",
"vendor/**"
]test_patterns
- Type: Array of Strings
- Presence: optional
- Description: Glob patterns to identify test files. Helps reduce false positives by distinguishing application code from test code.
test_patterns = [
"tests/**",
"test_*.py",
"**/*_test.go"
]analyzers
- Type: Array of Tables
- Presence: mandatory (at least one analyzer)
- Description: Each entry defines an analyzer to run. Every entry supports
name(String, mandatory),enabled(Boolean, optional, defaults totrue),dependency_file_paths(Array of Strings, optional), andmeta(Table, optional — analyzer-specific options documented below).
code_formatters
- Type: Array of Tables
- Presence: optional
- Description: Each entry defines a code formatter to run on pull requests. Supports
name(String, mandatory) andenabled(Boolean, optional). See the Code Formatters reference for available formatters.
The code_formatters key replaces the legacy transformers key. Both are supported for backward compatibility.
Complete example
version = 1
exclude_patterns = [
"vendor/**"
]
test_patterns = [
"tests/**"
]
[[analyzers]]
name = "python"
enabled = true
[analyzers.meta]
runtime_version = "3.x.x"Python
Analyzer shortcode: python
Code Analysis
The Python analyzer detects bugs, anti-patterns, security issues, and style violations in Python 2 and Python 3 code. It also supports type checking via mypy.
Configuration options
| Option | Type | Default | Description |
|---|---|---|---|
runtime_version | String | "3.x.x" | Python runtime version ("2.x.x" or "3.x.x") |
max_line_length | Integer | 88 | Maximum allowed line length (min 79) |
skip_doc_coverage | Array | ["module", "magic", "init"] | Artifacts to skip for doc coverage (module, magic, init, class, nonpublic) |
type_checker | String | None | Type checking analyzer ("mypy") |
additional_builtins | Array | None | Additional built-in names from user or third-party modules |
cyclomatic_complexity_threshold | String | "medium" | Risk threshold: low, medium, high, very-high, critical |
Example
[[analyzers]]
name = "python"
enabled = true
[analyzers.meta]
runtime_version = "3.x.x"For coverage tool setup, see Code coverage > Python. For supported vulnerability target files, see Vulnerability scanning > Python.
Go
Analyzer shortcode: go
Code Analysis
The Go analyzer detects bugs, anti-patterns, and security issues in Go code. It automatically resolves dependencies via supported package managers.
Configuration options
| Option | Type | Default | Description |
|---|---|---|---|
import_root | String | None | Repository placed at $GOPATH/src/{import_root}. Required if not using Go Modules. |
import_paths | Array | None | Override auto-detected import paths |
skip_doc_coverage | Array | None | Artifacts to skip for doc coverage (file) |
dependencies_vendored | Boolean | false | Skip dependency installation if vendored |
build_tags | Array | None | Build tags for conditional compilation |
cgo_enabled | Boolean | true | Whether packages use CGo |
cyclomatic_complexity_threshold | String | "medium" | Risk threshold: low, medium, high, very-high, critical |
import_path (String) is deprecated. Use import_root and let the analyzer auto-detect import_paths instead.
Example
[[analyzers]]
name = "go"