Codacy yaml 配置忽略测试文件中的重复

Pre*_*vić 1 yaml codacy

我想从我的测试文件中排除重复检查,但其他所有内容保持不变。

这是我的.codacy.yml文件:

duplication:
  enabled: true
  exclude_paths:
    - 'test/**'
    - '**.test.js'
Run Code Online (Sandbox Code Playgroud)

但是我仍然在测试文件中报告了所有重复项。

有谁知道如何做到这一点?

编辑基于我尝试过的以下建议:

engines:
  duplication:
    enabled: true
    exclude_paths:
      - 'test/**'
      - '**.test.js'
Run Code Online (Sandbox Code Playgroud)

我也试过不加引号:

engines:
  duplication:
    enabled: true
    exclude_paths:
      - test/**
      - '**.test.js'
Run Code Online (Sandbox Code Playgroud)

仍然没有骰子:(

小智 5

您似乎缺少engines配置文件中应用复制配置所需的属性。

您应该将配置文件更改为如下所示:

engines:
  duplication:
    enabled: true
    exclude_paths:
      - 'test/**'
      - '**.test.js'
Run Code Online (Sandbox Code Playgroud)