Giter Site home page Giter Site logo

rbiedrawa / sonarqube-gradle-project-reference-template Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 221 KB

Continuous inspection of code quality with SonarQube - Java / Gradle / Docker project reference template.

License: MIT License

Java 100.00%
code-quality code-quality-analyzer sonarqube sonar sonarqube-plugin gradle wiremock wiremock-server spring-boot unit-testing

sonarqube-gradle-project-reference-template's Introduction

Continuous inspection of code quality with SonarQube - Java / Gradle / Docker project reference template

This repository demonstrates how to perform and configure continuous inspection of code quality with SonarQube for Java / Gradle projects.

Features

  • Local SonarQube server via docker compose
  • Gradle SonarQube plugin configuration with custom coverage/issues exclusions
  • Jacoco coverage reports
  • Separated unit and integration tests.
  • Spring Boot integration tests with WireMock
  • Unit testing REST services clients via @RestClientTest

Getting Started

Prerequisites:

  • Java 11
  • Docker

Usage:

  1. Start local SonarQube server
    docker-compose -f ./docker/sonar.yml up -d
  2. Check if container is up and running by opening SonarQube dashboard, which should be available on http://localhost:9000/
  3. Run a SonarQube analysis
    ./gradlew clean sonarqube
  4. Once the analysis completes, it should be available on the Sonar dashboard. sonarqube-dashboard.png
  5. Check the code smells. code-smells.png
  6. Have a fun and play with the demo setup by fixing the code smells, adding more tests for better coverages or edit sonar-project.properties to tweak the analysis

Additional Useful Tools

References

For further reference, please consider the following sections:

License

Distributed under the MIT License. See LICENSE for more information.

sonarqube-gradle-project-reference-template's People

Contributors

rbiedrawa avatar

Stargazers

 avatar

Watchers

 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.