can't be indexed twice - testSourceDirectory and sourceDirectory are same

后端 未结 4 862
执笔经年
执笔经年 2021-01-03 21:05

I have created performance test as a maven submodule to my main module. All the test classes are written under src/main/java and not src/test

4条回答
  •  时光说笑
    2021-01-03 21:34

    I was facing the same problem. Finally, solved it with help of below documentation:-

    https://github.com/SonarOpenCommunity/sonar-cxx/wiki/FAQ

    Q: ERROR: Caused by: File [...] can't be indexed twice.

    A: In case of below error you have to verify your exclusion/inclusion properties. Please check that inclusion/exclusion patterns produce disjoint sets for source and test files

    ERROR: Caused by: File [...] can't be indexed twice. Please check that inclusion/exclusion patterns produce disjoint sets for main and test files An example could look like this:

    sonar.sources=.
    sonar.tests=.
    sonar.test.inclusions=**/*Test*/**
    sonar.exclusions=**/*Test*/**
    

提交回复
热议问题