Add Markdown linting to the Travis build by using the Rubygem mdl.
Some basic markdown linkting removing trailing whitespace and excess blank lines and mods to headings. Add config file to control which rules are run with basic setup of rules exlcuded for now. Add Rubygem mdl as development dependency. Correct typo in CHANGELOG.
RubyCritic is a gem that wraps around static analysis gems such as [Reek][1], [Flay][2] and [Flog][3] to provide a quality report of your Ruby code.
**Table of Contents**
##Table of Contents
- [Overview](#overview)
- [Getting Started](#getting-started)
@@ -22,7 +21,6 @@ RubyCritic is a gem that wraps around static analysis gems such as [Reek][1], [F
- [Contributors](#contributors)
- [Credits](#credits)
##Overview
This gem provides features such as:
@@ -68,7 +66,6 @@ This gem provides features such as:
Checkout the `/docs` if you want to read more about our [core metrics](https://github.com/whitesmith/rubycritic/blob/master/docs/core-metrics.md).
##Getting Started
RubyCritic can be installed with the following command:
@@ -90,7 +87,6 @@ And then execute:
$ bundle
```
##Usage
Running `rubycritic` with no arguments will analyse all the Ruby files in the
@@ -138,6 +134,7 @@ $ rubycritic --help
You also can use a config file. Just create a `.rubycritic.yml` on your project root path.
Here are one example:
```yml
mode_ci:
enabled: true # default is false
@@ -162,18 +159,16 @@ paths: # Files to analyse.
project root and `RubyCritic` will respect this configuration.
* [`flay`](https://github.com/seattlerb/flay): We use `flay`'s default configuration.
* [`flog`](https://github.com/seattlerb/flog): We use `flog`'s default configuration with a couple of [smaller tweaks](https://github.com/whitesmith/rubycritic/blob/master/lib/rubycritic/analysers/helpers/flog.rb#L5):
*`all`: Forces `flog` to report scores on all classes and methods. Without this option `flog` will only give results up to a certain threshold.
*`continue`: Makes it so that `flog` does not abort when a ruby file cannot be parsed.
*`methods`: Configures `flog` to skip code outside of methods. It prevents `flog` from reporting on the "methods" `private` and `protected`. It also prevents `flog` from reporting on Rails methods like `before_action` and `has_many`.
*`all`: Forces `flog` to report scores on all classes and methods. Without this option `flog` will only give results up to a certain threshold.
*`continue`: Makes it so that `flog` does not abort when a ruby file cannot be parsed.
*`methods`: Configures `flog` to skip code outside of methods. It prevents `flog` from reporting on the "methods" `private` and `protected`. It also prevents `flog` from reporting on Rails methods like `before_action` and `has_many`.
###Alternative Usage Methods
If you're fond of Guard you might like [guard-rubycritic][4]. It automatically analyses your Ruby files as they are modified.
For continuous integration, you can give [Jenkins CI][5] a spin. With it, you can [easily build your own (poor-man's) Code Climate][6]!
###Rake Task
You can use RubyCritic as Rake command in its most simple form like this:
@@ -225,7 +220,6 @@ RubyCritic is supporting Ruby versions:
* 2.5
* 2.6
##Improving RubyCritic
RubyCritic doesn't have to remain a second choice to other code quality analysis services. Together, we can improve it and continue to build on the great code metric tools that are available in the Ruby ecosystem.
@@ -236,10 +230,8 @@ Similarly, Pull Requests that improve the look and feel of the gem, that tweak t
See RubyCritic's [contributing guidelines](https://github.com/whitesmith/rubycritic/blob/master/CONTRIBUTING.md) about how to proceed.
##Contributors
`RubyCritics` initial author was [Guilherme Simões](https://github.com/guilhermesimoes).
The current core team consists of:
@@ -248,7 +240,6 @@ The current core team consists of:
Having an option to toggle between "Smells", "Security" (Brakeman) and "Style" (Rubocop) would be great. But that's already assuming we can integrate those gems into RubyCritic.
Having an option to toggle between "Smells", "Security" (Brakeman) and "Style" (Rubocop) would be great. But that's already assuming we can integrate those gems into RubyCritic.
@@ -46,7 +46,6 @@ Each file is represented by a dot. **The closer they are to the bottom-left corn
But keep in mind that you cannot reduce churn (well... not unless you re-write your repo's history :neckbeard:), so try to keep the dots as close to the bottom as possible.
Chad made a nice [summary if you want to know more][8] about the meaning behind each quadrant.
##Rating
This is a letter from `A` to `F`, `A` being the best. This serves as a baseline to tell you how *smelly* a file is.
@@ -61,7 +60,6 @@ Generally `A`'s & `B`'s are good enough, `C`'s serve as a warning and `D`'s & `F
The definition of this **cost** varies from tool to tool, but it's always a non-negative number, with high values indicating worse smells.
The **complexity** of a file also (slightly) affects its final cost.
0 comments on commit
355f151