Giter Site home page Giter Site logo

simple-quality-gate's Introduction

Simple Quality Gate (SQG)

The goal of this project is to improve software quality through static analysis of the source code. It is intended to be used a step on a CI pipeline, where if a code rule fail, the pipeline fails. Currently it has five metrics to be used on Java projects:

  • Block size
  • File size
  • Cyclomatic complexity per block
  • Cyclomatic complexity per class
  • Quantity of parameters of a method

For this project, the concept of 'block' is anything between brackets inside of a class (method, if/for/while statement, static block, etc).

Configuration

To configure the Simple Quality Gate is very simple. There is a property file called app.properties which contains the following configurations:

  • build.break: Set to true to break the build
  • src.root: The root where the SQG should start looking for .java to analyze
  • src.encoding: The encoding of the Java files
  • rule.'key': Configure the threshold of the rule. The existing keys are:
    • rule.complexity_per_block
    • rule.complexity_per_file
    • rule.file_size
    • rule.block_size
    • rule.rule_quantity_of_parameters
  • report.export: Define a file path to save the analysis report on file
  • report.block_from_getting_worse: For projects that are already in development, it is recommended to first generate a report using the property report.export and then put the generated file in this property. By doing that, the SQG won't break the build for the files that are already over the threshold, it'll break only if they get worse from their current values.

simple-quality-gate's People

Stargazers

Fabio Domingues 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.