Sourcery
Sourcery YAML files
| Type | object |
|---|---|
| File match |
.sourcery.yaml
|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/sourcery/latest.json |
| Source | https://www.schemastore.org/sourcery_yaml_schema.json |
Validate with Lintel
npx @lintel/lintel check
Type:
object
Properties
version
string
The schema version of this config file
ignore
string[]
A list of paths or files which Sourcery will ignore.
[]
rule_settings
{
"enable": [
"default"
],
"disable": [],
"include": [],
"skip": [],
"rule_types": [
"refactoring",
"suggestion",
"comment"
],
"python_version": null,
"allow_adding_imports": false
}
RuleSettingsConfig object
rule_tags
Record<string, string[]>
Additional rule tags.
{}
github
{
"labels": [],
"ignore_labels": [
"sourcery-ignore"
],
"review_or_request_review": "author",
"sourcery_branch": "sourcery-dev/{base_branch}"
}
GitHubConfig object
clone_detection
{
"min_lines": 3,
"min_duplicates": 2,
"identical_clones_only": false
}
CloneDetectionConfig object
Definitions
RuleType
enum
An enumeration.
PythonVersion
object
major
integer
required
minor
integer
required
RuleSettingsConfig
object
enable
string[]
[
"default"
]
disable
string[]
A list of rule IDs Sourcery will never suggest.
[]
rule_types
RuleType[]
[
"refactoring",
"suggestion",
"comment"
]
python_version
string | PythonVersion
A string specifying the lowest Python version your project supports. Sourcery will not suggest refactorings requiring a higher Python version.
RuleLanguage
string
An enumeration.
PathsConfig
object
include
string[]
exclude
string[]
MatchRuleTestConfig
object
match
string
required
expect
string
NoMatchRuleTestConfig
object
no-match
string
required
RuleConfig
object
id
string
required
maxLength=88pattern=^[A-Za-z][A-Za-z0-9-_/:]*$
description
string
required
pattern
string
required
language
RuleLanguage string
replacement
string
condition
string
explanation
string
paths
object
2 nested properties
include
string[]
exclude
string[]
tests
MatchRuleTestConfig | NoMatchRuleTestConfig[]
[]
tags
string[]
[]
MetricsConfig
object
quality_threshold
number
RequestReview
object
origin
string
forked
string
GitHubConfig
object
labels
string[]
[]
ignore_labels
string[]
[
"sourcery-ignore"
]
request_review
string | RequestReview
sourcery_branch
string
CloneDetectionConfig
object
min_lines
integer
min_duplicates
integer
identical_clones_only
boolean
ProxyConfig
object
url
string
format=uriminLength=1maxLength=65536
ssl_certs_file
string
no_ssl_verify
boolean