07 Nov 2016

Introducing the SensioLabsInsight commit status on GitHub

SensioLabsInsight main goal has always been to give you "insights" of your code in order to monitor its quality and the technical debt of your project. A few days ago, we introduced a powerful feature to improve your developer experience in this domain: the SensioLabsInsight commit status on GitHub.

The challenge of keeping clean code

Keeping code clean during the first phase of a project is usually not too difficult: the team does not change much, the architecture was well thought to solve the original problem and the code is written in big chunks, following the same conventions at each modification.

On the other hand, all along the project lifespan, the team changes, the original problem evolves and the code has to adapt to these changements. This naturally leads to technical debt.

As developers, technical debt is our worst enemy: it brings bugs and lack of trust in the code, it makes the project's architecture fragile and ultimately it dramatically slows down development speed. While keeping code clean is therefore essential, it's usually very difficult to measure it and act early enough.

That's where SensioLabsInsight shines: by providing an objective and thorough analysis of your project's code, it will give you an idea on when and how you have to act to avoid technical debt.

The SensioLabsInsight commit status on GitHub: the ultimate tool in your hands

At SensioLabs, we are developers, just like you. We understand how important Continous Integration is and especially how its integration in your development process has to be as smooth as possible.

Today, we bring SensioLabsInsight to you by integrating it in your development process directly as a Github status on your pull requests, just like your other Continous Integration tools.

This feature is enabled by default on every Github project and has been backported to every repository, even created before today. You should already get commit statuses on your pull requests!

Configure it to your needs

The commit status is processed by analysing your code and evaluating a few conditions called "failure conditions": if one of them is evaluated as true, the commit is displayed as failed on Github.

To change the failure conditions, you can add the key commit_failure_conditions to you project configuration (in the web interface) or to your .sensiolabs.yml file (in your repository).

Here is the reference of this configuration key:

commit_failure_conditions:
    # By severities count (default configuration, any change will override it)
    - "project.severity.critical > 0"
    - "project.severity.major > 0"

    # # By other severities count
    # - "project.severity.minor > 0"
    # - "project.severity.info >= 15"
    #
    # # By categories count
    # - "project.category.architecture > 0"
    # - "project.category.bugrisk > 0"
    # - "project.category.codestyle > 0"
    # - "project.category.deadcode > 0"
    # - "project.category.performance > 0"
    # - "project.category.readability > 0"
    # - "project.category.security > 0"
    #
    # # By project grade (none, bronze, silver, gold, platinum)
    # - "project.grade >= gold"
    #
    # # By total violations count
    # - "project.violations > 150"

We're very happy to release this feature, please help us make it better by giving your feedback!

comments powered by Disqus