Split PropertyFormat into separate linters

The `PropertyFormat` linter suffered from bugs due to the brittle regex
it employed to check the format of the property declaration. This regex
also attempted to test too much, making the error message in the event
of a lint being discovered not terribly useful.

Split out the `PropertyFormat` linter into three separate linters:

  * `SpaceAfterPropertyColon`
    Prefers `margin: 0;` instead of `margin:0;`

  * `SpaceAfterPropertyName`
    Prefers `margin: 0;` instead of `margin : 0;`

  * `TrailingSemiColonAfterProperty`
    Ensures the final property in a rule set has a trailing semi-colon

These linters are simpler thanks to the support for being able to query
source ranges on all Sass parse tree nodes, and no longer require the
use of a brittle regex.

Change-Id: I4cb1bbccca1457b65ac3d66f578d15937735a37c
Reviewed-on: https://gerrit.causes.com/30680
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Add SpaceAfterComma linter

Add a linter which checks for the presence of a single space character
after a comma in argument lists or literal lists.

This lint is ignored when the comma is followed by a newline (i.e. the
arguments are split up over multiple lines).

This required a slight modification of the `character_at` helper to
return a newline character when the offset passed in as the second
argument results in the position being at the end of the line (i.e.
where the newline character would be).

Closes #26

Change-Id: I57db24658062fe8d6b85e4c9a1e754e4a83cb723
Reviewed-on: https://gerrit.causes.com/30681
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Gracefully handle errors in linters

Previously, if a linter raised an error `scss-lint` would crash with no
helpful information about which SCSS file caused the error.

Change this to report a nice error message with the name of the linter,
the file it failed on, the original error message, and the original
backtrace for the error. Also include a message with the URL for the
GitHub repo so the developer can easily report bugs.

Also included for free is some class-level documentation and a few
Rubocop lint fixes.

Closes #44

Change-Id: I892b6cc2bfd365b84fdd83b47c467679e0a5b781
Reviewed-on: https://gerrit.causes.com/30682
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Add linter documentation to README

Long overdue is an overhaul to the README to actually explain what is
getting linted and why. This is more useful to developers as they tend
to quickly scan the README before deciding whether to use a gem.

Going forward it should be a lot easier to keep this up-to-date.

Change-Id: I4383b32a3247f993bd709ca940c1c01ac5d89f02
Reviewed-on: https://gerrit.causes.com/30683
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Add link to changelog in README

For developers not familiar with the convention of using `CHANGELOG` as
the filename for the changelog, add a direct link to the changelog in
the README.

Also updates the README to clarify which Sass syntax the tool supports
and adds better syntax highlighting to the installation instructions.

Change-Id: I1cb2b0bf9dc1fd225598b5e116ced5abe501bfa5
Reviewed-on: https://gerrit.causes.com/30693
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Cut version 0.12.0

Also fixed a small typo in the CHANGELOG.

Change-Id: I29794ca5b5159e2597e11d0f6bb130159abfcd24
Reviewed-on: https://gerrit.causes.com/30694
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Joe Lencioni <joe.lencioni@causes.com>
Move SCSSLint specs into spec/scss_lint

This matches standard RSpec practice.

Change-Id: I0f75541b374d11151ed25c667f9fc37a6ac8bd06
Reviewed-on: https://gerrit.causes.com/30809
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Add PropertyWithMixin Compass linter

Add the first Compass-specific linter, `PropertyWithMixin` which checks
for properties which have corresponding Compass mixins whose use is
preferred over the property.

Change-Id: I967bf51a748d543e45c38762d7342c34529b0155
Reviewed-on: https://gerrit.causes.com/30810
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Hao Su <hao.su@causes.com>
Move helper methods out of lib/scss_lint.rb

Investigation into other gems reveals that the root file in lib
typically only loads other code needed by the gem.

With this in mind, remove the code defined here into `CLI` (since it was
only used by that class anyway) and convert `autoload` statements into
`require`s so that we don't need the containing `module` declaration.

Change-Id: I932856758b76530c0f9a2f5979388f1151f0f63f
Reviewed-on: https://gerrit.causes.com/30811
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Hao Su <hao.su@causes.com>
Include filename in linter errors

Commit f0d96f2 claimed to include the name of the file the linter failed
on but didn't actually. Change it to actually include the name of the
file.

Change-Id: I478231883a0f3e02ea1bc15ddb83274cb9aba76a
Reviewed-on: https://gerrit.causes.com/30840
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Fix Shorthand linter crash on numeric properties

The Sass parser appears to treat the following pieces of code
differently:

  p { margin: 5px; }

  p { margin: 5px }

The first results in the number being interpreted as a `Value::String`,
and the second results in the number being interpreted as a
`Value::Number`.

This discrepancy was causing the `Shorthand` linter to fail on the
second example.

Fixes #45

Change-Id: I06a372e95f18196b696ed9f82ea8cec581eb5267
Reviewed-on: https://gerrit.causes.com/30844
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Merge branch 'master' of https://github.com/causes/scss-lint

Conflicts:
	lib/scss_lint/linter/leading_zero.rb
	lib/scss_lint/linter/property_format.rb