Sometime this rule squid:S2259 is ignored in a java file

java

(ken.lam) #1
  • versions used
    SonarQube: 6.7
    Sonar-scanner: 3.0.3.778
    SonarJava Plugin: 5.5
    Java: 1.8.144
    OS: CentOS Linux release 7.4.1708 (Core)

  • minimal code sample to reproduce
    public void foo(Object obj) {
    LogHelper.logEntry((obj == null ? ojb : ojb.toString()));
    for (Object o : MyCheck.nullSafe(obj.getArray())) {…}
    }

    analyse by sonar-scanner command tool:
    opts="-Dsonar.projectKey=${projKey}
    -Dsonar.branch=${branchName}
    -Dsonar.projectName=${projKey}
    -Dsonar.projectVersion=${BUILD_NUMBER}.0
    -Dsonar.sources=.
    -Dsonar.java.binaries=.
    -Dsonar.java.source=1.8
    -Dsonar.coverage.exclusions=* * / * . *
    -Dsonar.global.exclusions=* * /src/test/ * * , * * /target/ * *
    -Dsonar.global.test.exclusions=* * /src/test/ * * , * * /target/ * * "
    ${sqScannerHome}bin/sonar-scanner ${opts}


(simon chan) #2

i have the same problem as you do. Any updates?


(ken.lam) #3

great~have you solved the issue?


(ken.lam) #4

Are there anyone who has also encountered the issue?