我可以通过任何方式修复detekt.yml
中的架构警告,我将附上屏幕截图并打开以添加更多详细信息
最小可重现detekt.yml
低于
build:
maxIssues: 0
excludeCorrectable: false
weights:
complexity: 2
LongParameterList: 1
style: 1
comments: 1
config:
validation: true
warningsAsErrors: true
# when writing own rules with new properties, exclude the property path e.g.: 'my_rule_set,.*>.*>[my_property]'
excludes: ''
processors:
active: true
exclude:
- 'DetektProgressListener'
# - 'KtFileCountProcessor'
# - 'PackageCountProcessor'
# - 'ClassCountProcessor'
# - 'FunctionCountProcessor'
# - 'PropertyCountProcessor'
# - 'ProjectComplexityProcessor'
# - 'ProjectCognitiveComplexityProcessor'
# - 'ProjectLLOCProcessor'
# - 'ProjectCLOCProcessor'
# - 'ProjectLOCProcessor'
# - 'ProjectSLOCProcessor'
# - 'LicenseHeaderLoaderExtension'
style:
active: true
ReturnCount:
active: true
max: 2
excludedFunctions: 'equals'
excludeLabeled: false
excludeReturnFromLambda: true
excludeGuardClauses: true
安卓版:Android Studio海豚|2021.3.1修补程序1内部版本号AI-213.7172.25.2113.9123335,构建于2022年9月30日运行时版本:11.0.13+ 8125866 x86_64虚拟机0-b1751.21-8125866:JetBrains s.r.o.提供的OpenJDK 64位服务器虚拟机
1条答案
按热度按时间xt0899hw1#
好的,经过一些探索,我发现,在
detekt
release v1.21.0中,他们将所有配置从逗号分隔的string
更改为detekt.yml
中string
的array
。最初它是
excludedFunctions: 'equals, hashCode'
,现在变成了excludedFunctions: ['equals', 'hashCode']
在
detekt
release v1.22.0之后,他们开始在构建项目时抛出错误。