Fix TrailingSemicolon messages

Change-Id: I876428140204aa006d22b8b8783a07f70787b3c9
Reviewed-on: http://gerrit.causes.com/44392
Tested-by: jenkins <jenkins@brigade.com>
Reviewed-by: Joe Lencioni <joe.lencioni@brigade.com>
Upgrade Rubocop to 0.27.1 for Travis builds

Change-Id: Ie6d5a39667069b49c11100ce6e75f78a64eb522a
Reviewed-on: http://gerrit.causes.com/44444
Tested-by: jenkins <jenkins@brigade.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Ignore '!' in strings in BangFormat

Change-Id: I1f816baeeed89ced103af2d02c8678b327f743a4
Reviewed-on: http://gerrit.causes.com/44539
Tested-by: jenkins <jenkins@brigade.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Bump minimum Sass version to 3.4.1

There is a bug in the Sass parser that was causing one of the tests
introduced for `BangFormat` to break. It is fixed in this version.

Change-Id: Ied232e8a69bb4f0971e02607f710fd2527efe746
Reviewed-on: http://gerrit.causes.com/44540
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Tested-by: jenkins <jenkins@brigade.com>
Update changelog with recent fixes

Change-Id: Icbe93722ac44998dd62362b2cdc93543dfbbeb51
Reviewed-on: http://gerrit.causes.com/44541
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Tested-by: jenkins <jenkins@brigade.com>
Move RuboCop version pinning into Gemfile

We were declaring the pinned version of RuboCop as a
development dependency in the gemspec. This turns out to not be
technically correct, as it's not really a development dependency, but a
testing one (i.e. we don't want to enforce this requirement for
developers using this gem when developing other gems that require this
gem).

It turns out a way get around this is to declare the pinned version in
the `Gemfile`.

Change-Id: Ifa27a9c2cec89297300fc99f0aae483839eb636c
Reviewed-on: http://gerrit.causes.com/44724
Tested-by: jenkins <jenkins@brigade.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Use https in Rubygems source

Change-Id: I7470c48a9d611e98ee41db42ef30c9671508fd8c
Reviewed-on: http://gerrit.causes.com/44725
Tested-by: jenkins <jenkins@brigade.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Fix DuplicateProperty handling of nested rule sets

The linter would not report duplicate properties in nested rule sets.

Fix #295 by `yield`ing to continue visiting children.

While here, also did a bit of cleanup.

Change-Id: I73ad40e3cf65d72b0792e77a62e33fb75cc77ac8
Reviewed-on: http://gerrit.causes.com/44730
Tested-by: jenkins <jenkins@brigade.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Fix TrailingSemicolon handling of comma-separated imports

The linter would incorrectly report lints for comma-separated imports
like the following:

    @import 'functions/strip-units',
            'functions/pc';

This was caused by the fact that the `sass` parser still creates
a parse node for each `@import`. Fix #294 by ignoring imports whose
source range ends with a comma.

Change-Id: I7c69a3b777fdb31ab092bb35aa6f9c2bc4c005c0
Reviewed-on: http://gerrit.causes.com/44731
Tested-by: jenkins <jenkins@brigade.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Add UnnecessaryParentReference to README ToC

The UnnecessaryParentReference exists in the document but not in
the table of contents.

Change-Id: I14a08a2cd4a1681388c29922964d8c787fed7fd6
Reviewed-on: http://gerrit.causes.com/44876
Reviewed-by: Joe Lencioni <joe.lencioni@brigade.com>
Tested-by: jenkins <jenkins@brigade.com>
Add hyphenated_BEM option to Linters Documentation

Change-Id: I556b5d2198714c8b56be516ce8a36ab0c13a0a05
Reviewed-on: http://gerrit.causes.com/44877
Reviewed-by: Joe Lencioni <joe.lencioni@brigade.com>
Tested-by: jenkins <jenkins@brigade.com>
Add defaults to VendorPrefixes config options in Readme

Change-Id: Ib182b9316987f448cc734b70fffcfed8e6e26258
Reviewed-on: http://gerrit.causes.com/44886
Tested-by: jenkins <jenkins@brigade.com>
Reviewed-by: Joe Lencioni <joe.lencioni@brigade.com>
Don't lint pseudo-selectors in SelectorFormat

The SelectorFormat linter shouldn't lint pseudo-selectors since these
must always use a hyphenated lowercase convention.

Change-Id: I1b3f65a8017d69c5f984b7721f626c9c27348e75
Reviewed-on: http://gerrit.causes.com/44887
Tested-by: jenkins <jenkins@brigade.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Fix Indentation handling of comments in @at-root

The linter would crash for code like the following:

    @at-root {
      // A comment
      ...
    }

This was due to the fact that comments don't have source ranges. Fix by
explicitly checking if `source_range` is not nil before attempting to
access it.

Change-Id: I8b1518458381689178b402fc8b9eb3c8dfa13100
Reviewed-on: http://gerrit.causes.com/44888
Tested-by: jenkins <jenkins@brigade.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Extract Options helper class from CLI class

The CLI class was becoming very unwieldy and hard to reason about.
Extract the command line options parsing functionality into a helper
class and change the signature of `CLI#run` to return the exit code
rather than have the method raise a `SystemExit` error itself.

Additional changes to come will extract more functionality from this
class to simplify it further.

Change-Id: I8432231ad6152313b085ef8de13bebbd22243918
Reviewed-on: http://gerrit.causes.com/44889
Tested-by: jenkins <jenkins@brigade.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Allow linters to be disabled/enabled via inline comments

Change-Id: Ie8f6da6441d1239dbf39f3859cff4f716ad5d9c3
Reviewed-on: http://gerrit.causes.com/44909
Tested-by: jenkins <jenkins@brigade.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Add documentation for enable/disable inline comments

Change-Id: I1cab281d48bc5ec4d7a9279ab7bc911f5b9085ae
Reviewed-on: http://gerrit.causes.com/44910
Tested-by: jenkins <jenkins@brigade.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Change `#length` check to conventional `#empty?`

Change-Id: Ie58ecd9c2e9bffa5d892b342ad196e6102a9e2fe
Reviewed-on: http://gerrit.causes.com/44911
Tested-by: jenkins <jenkins@brigade.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Update README wording

Make linter enabling/disabling via inline comments documentation more
consistent.

Change-Id: If5f26f1c78b72f1dbc295ef25503c8e710b443e3
Reviewed-on: http://gerrit.causes.com/44912
Tested-by: jenkins <jenkins@brigade.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Change `IdWithExtraneousSelector` to `IdSelector`

Rename and modify behavior of linter to always report IDs any time they
appear in a selector, rather than only when they appear concatenated
with a type/class etc.

Change-Id: Ie2bbc54cab25faaef6715c340e8d3798d07bd051
Reviewed-on: http://gerrit.causes.com/44913
Tested-by: jenkins <jenkins@brigade.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>