Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Travis - INFO: SonarQube Scanner analysis skipped

Tags:

sonarqube

I am trying to add SonarQube analysis to our OSS Project with travis on Github.

I performed the following steps:

  1. Create a organization and project on sonarcloud.io
  2. Add the sonarcloud definition in .travis.yml
  3. Create a sonar-project.properties file
  4. Push everything to a feature branch called feature/sonarcloud
  5. Add this branch to travis.yml and properties file.

The final result can be seen here: https://github.com/open62541/open62541/tree/feature/sonarcloud

Unfortunately Travis does not submit the sonar analysis:

INFO: Scanner configuration file:
/home/travis/.sonarscanner/sonar-scanner-2.8/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarQube Scanner analysis skipped

(See also https://travis-ci.org/open62541/open62541/jobs/287631673)

I already tried to forcefully set export SONARQUBE_SKIPPED=false but it is still skipped. How can I find out why the scanner analysis is skipped?


Related questions:

  • SonarQube Scanner analysis skipped in travis CI
  • Travis CI skipping SonarQube analysis
like image 708
Stefan Profanter Avatar asked Jan 24 '26 08:01

Stefan Profanter


1 Answers

As you can read in the Travis CI logs, at line 556:

Skipping SonarCloud Scan because this branch is not master or it does not match declared branches

This is because you haven't activated analysis on that "feature/sonarcloud" branch. As described in the official documentation, you can achieve that like this:

  addons:
    sonarcloud:
      organization: open62541
      token:
        secure: "..."
      branches:
        - master
        - feature/sonarcloud
like image 168
Fabrice - SonarSource Team Avatar answered Jan 27 '26 00:01

Fabrice - SonarSource Team



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!