Giter Club home page Giter Club logo

ruby-sonar-plugin's Introduction

Build Status Sonar Ruby Plugin

##Description / Features The plugin enables analysis of Ruby projects within SonarQube

Currently the plugin captures basic metrics (Lines of Code, Number of classes and packages, Comment percentage), complexity on each file, and a visual line-by-line code coverage report.

It relies on well-known external tools: SimpleCov, SimpleCov-RCov and Metric_Fu

##Install Download the plugin into the SONARQUBE_HOME/extensions/plugins directory

##Usage Make sure the property sonar.language is set to ruby: sonar.language=ruby in the sonar-project.properties file

#####Code Coverage In order for the plugin to report on code coverage, the ruby project needs to be using simplecov-rcov to generate a coverage report when you run your tests/specs, please see the gem's homepage here for installation and usage instructions.
Important: Do not change the output directory for the simplecov-rcov report, leave it as default, or code coverage will not be reported.

#####Code Complexity In order for the plugin to report on code complexity, metric_fu needs to be ran against the ruby project, which will generate a metric report. Please see the gem's homepage here for installation and usage instructions.
Important: metric_fu reports on more than just code complexity, however we still recommend to use the metric_fu command: metric_fu -r this will run all metrics. At the very least, Saikuro and Hotspots metrics need to be ran for complexity to be reported. Also, do not change the output directory for the metric_fu report, leave it as default or code complexity will not be reported

##Future Plans

  • Code Duplication
  • Code Violations
  • Configuration option to specify simplecov-rcov and metric_fu report directories

##Giving Credit The github project pica/ruby-sonar-plugin, is where the ruby-sonar-plugin started, rather than reinvent the wheel, we thought it better to enhance it. We used that plugin as a starting point for basic stats, then, updated the references to their latest versions and added additional metrics like line-by-line code coverage and code complexity.

We referenced the javascript sonar plugin and the php sonar plugin for complexity and coverage implementation. Our complexity sensor and code coverage sensor borrow heavily from the javascript plugin's equivalent sensors.

##Tool Versions

  • We are using Sonar 3.5.1 along with the Sonar 3.5.1 api (You must be using at least sonar 3.5 for the plugin to work)
  • We are using Sonar-Runner 2.2.2 to anaylze our projects
  • metric_fu 4.2.1 (latest at time of edit)
  • simplecov 0.7.1 (latest at time of edit)
  • simplecov-rcov 0.2.3 (latest at time of edit)

ruby-sonar-plugin's People

Contributors

wpgreenway avatar mxsmith-godaddy avatar harryli-godaddy avatar thefigler avatar mrowe 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.