正在获取架构验证:Android Studio中detekt.yml中的不兼容类型

5q4ezhmt  于 2022-12-13  发布在  Android
关注(0)|答案(1)|浏览(188)

我可以通过任何方式修复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位服务器虚拟机

xt0899hw

xt0899hw1#

好的,经过一些探索,我发现,在detektrelease v1.21.0中,他们将所有配置从逗号分隔的string更改为detekt.ymlstringarray
最初它是excludedFunctions: 'equals, hashCode',现在变成了excludedFunctions: ['equals', 'hashCode']
detektrelease v1.22.0之后,他们开始在构建项目时抛出错误。

相关问题