Git Product home page Git Product logo

sonar-scanner's Introduction

@mathrix-education/sonar-scanner

Workflow status Latest release

Install the Sonar Scanner CLI in GitHub Actions workflow.

This project is not supported by Sonar Cloud.

Proudly maintained by Mathieu Bour, Vice-CTO @mathrix-education.

Motivations

If the official SonarSource/sonarcloud-github-action action works perfectly, the fact that it is based on Docker makes it quite slow since you have to build the Docker image before using it. Moreover, the official action is mainly build for Sonar Cloud and using it when hosting your own Sonarqube instance can be quite tricky.

This goal of this action is to provide a fast and reliable way to run Sonar Scanner on every platform by using the provided JDK.

Supported operating systems

All operating systems provided by GitHub Actions are supported. The supported operating systems matrix is the following:

Operating system Status
ubuntu-latest 3.1
macos-latest 3.1
windows-latest 3.1

Usage

Inputs

See action.yml for details.

Name Type Default value
version 'latest' / string
with-jre true / false false
options string ''
typescript true / false false
unshallow true / false false
scan true / false false
args string ''

version

The version is required since it is used to download Sonar Scanner. You can find the available versions on the official Sonar Scanner repository

with-jre

Use the bundled JRE in the Sonar Scanner CLI archive.

options

The options input will set the default sonar-project.properties values by writing into the conf/sonar-project.properties file. This input is useful if you do not have a sonar-project.properties file in your project.

typescript (true/false, default false)

Install TypeScript during the setup. Useful only if you want to analyse TypeScript code.

scan (true/false, default false)

Run the sonar-scanner command immediately after the setup.

args

Additional flags to append to the sonar-scanner command. It will be ignored if scan is set to false.

Examples

To analyse this repository, we would add the following code to our workflow:

- uses: mathrix-education/sonar-scanner@master
  with:
    version: 4.2.0.1873 # required
    typescript: true
    scan: true
    args: --debug -Dsonar.login=${{ secrets.SONAR_TOKEN }}

sonar-scanner's People

Contributors

mathieu-bour avatar dreamerchandra avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.