Allow NameFormat convention to be customized

The ability to configure the convention used when validating names,
specifically with regards to the BEM (Block Element Modifier) convention
(http://bem.info/method/), was requested.

Augment `NameFormat` to support the default 'hyphenated-lowercase'
convention by default as well as the 'BEM' convention. Furthermore, if
any other string is provided, this will use that string as a regex when
validating the name.

To simplify the code a bit, I removed the differentiation between name
uses and name declarations, as this made the code more difficult than
the value it provided. It also allowed this amendment to be coded using
a simple hash lookup since no additional context was necessary.

Change-Id: I3082b6fa80c6046ca6d329819ef4ede9e5d8b847
Reviewed-on: http://gerrit.causes.com/36418
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Add documentation for NameFormat convention option

Change-Id: Ife2112d92c302d505e4aa5c876565cb6799038b6
Reviewed-on: http://gerrit.causes.com/36419
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Convert hard tabs to tab escapes in spec

This will appease the Rubocop gods. (also helpful for editors that
auto-expand tabs)

Change-Id: I06868bcc55c7c3a2fbb15f921a9259c07e127efc
Reviewed-on: http://gerrit.causes.com/36420
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Partially fix false positives in SpaceBetweenParens

The `SpaceBetweenParens` linter would report a lint for invalid
parentheses spacing in comments.

This is actually a hard problem to solve, because the Sass parser
doesn't report valid source ranges for certain node types or
expressions.

One such example is:

    p {
      margin: ( value);
    }

In the above example, the source range for the literal value in brackets
is " value)". In other words, we have no way of knowing where the
opening parenthesis is if this expression were to be spread over
multiple lines, and robustly detecting this case is incredibly involved.

For the nature of this check, the juice simply isn't worth the squeeze
unless the Sass parser gets more accurate with its source range
reporting.

As a compromise, add some handling that will deal with the majority of
cases by ignoring parentheses after comment line openers (`//` or `/*`).
It will still miss some cases, but it's good enough for free software.

Change-Id: I8d35255236e7fda598beff0c6a06bae235fcfb22
Reviewed-on: http://gerrit.causes.com/36421
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Add basic rake task

Allow `scss-lint` to be invoked via `rake`.

This is a bare-minimum implementation. Any customization should be
accomplished using the `.scss-lint.yml` configuration file.

Change-Id: I8da87d2bd0421b5bffd62d889a8cbb0d2260898d
Reviewed-on: http://gerrit.causes.com/36422
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Update Lexer#number monkey patch

This monkey patch was resulting in invalid parse trees being generated.

We knew this was a risk when we first introduced this. Fix it by
patching again for now, but we'll try to follow up with a solution that
doesn't require patching.

Change-Id: Ied78602cbfd273a36d6222f12f3968ddd0827a67
Reviewed-on: http://gerrit.causes.com/36423
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Remove monkey patch for Lexer#number

The Sass parser's source map now gives us enough information to
implement the `LeadingZero` linter without requiring a monkey patch.

Remove the patch.

Change-Id: I112f6e108c2e8b66c8e01430ec767161f50dd813
Reviewed-on: http://gerrit.causes.com/36424
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Ignore FormatString cop

Using '%' is convenient when dealing with customizable strings.

Change-Id: I910dd5e5537245367eee7280dfc90b887b1ea286
Reviewed-on: http://gerrit.causes.com/36425
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Add style configuration option to LeadingZero

The `LeadingZero` linter can now be configured to prefer leading zeros
instead of reporting them, which was requested in #92.

Change-Id: I998f32b016b8df8ed87c438424b209da41d2b5f8
Reviewed-on: http://gerrit.causes.com/36426
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Remove Lexer#color monkey patch

The new Sass parser source maps give us enough information to no longer
require this patch.

Change-Id: I57e1ba0c83773036ec476643d2f5c543f2ac0a07
Reviewed-on: http://gerrit.causes.com/36427
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Remove original_string accessor for Value::Number

Forgot to remove this in 4d5a397. In the process, discovered that
`ZeroUnit` was still referencing `original_string` even though it didn't
need to.

Change-Id: Ic55ddb1bc22e3be852ce38cac7dc1db521db0f45
Reviewed-on: http://gerrit.causes.com/36428
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Remove color-related monkey patches

Sass source maps make these patches obsolete. Remove them and implement
their corresponding functionality using source maps.

Change-Id: Iaa372106bae8e93e41cc2c5b004e23fd5d6fda22
Reviewed-on: http://gerrit.causes.com/36429
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Cut version 0.20.0

Change-Id: Ie5b714bbda2501cebb74dee36ad65e6ec91e935c
Reviewed-on: http://gerrit.causes.com/36430
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Fix SpaceBeforeBrace bug for single line blocks

This fixes issue #94 where `scss-lint` didn't report lints for single
line blocks such as:

  .single-line-selector{color: #fff;}

The solution was to remove the requirement that `{` was the last
character in the line.

Change-Id: I365333ff8f0a34580b3649f8d6c25c732c7be5d8
Reviewed-on: http://gerrit.causes.com/36492
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Change wording of SpaceBeforeBrace message

Use "should" instead of "must", which follows our convention for other
lints.

Change-Id: I187db851581ed4f2c1b76c98c7f4a73bb35308d6
Reviewed-on: http://gerrit.causes.com/36493
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Cut version 0.20.1

Change-Id: I34f96588fa72eb7368fda4f19ba0eec9e38bd7e9
Reviewed-on: http://gerrit.causes.com/36495
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Fix SpaceBeforeBrace bug for interpolations

This fixes an issue where `scss-lint` reported a lint for css statements
using interpolations in mixins such as:

    .#{$class}{ #{$property}: 10px;}

The solution was to add the hash to the preceding character exclusion.

Change-Id: I6554ec8804da6554e247f55d57ae8c3cfd8bdd52
Reviewed-on: http://gerrit.causes.com/36590
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Cut version 0.20.2

Change-Id: I5aac2c1abb456c11954f5a02f2480afed81d61a7
Reviewed-on: http://gerrit.causes.com/36591
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Fix headings in CHANGELOG

Change to h2s instead of h1s.

Change-Id: I971d28631c1741587b35812c7253714478ab0666
Reviewed-on: http://gerrit.causes.com/36631
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Ignore names of Compass translation mixins

The `NameFormat` linter was erroneously reporting an error for
translation-related mixin names. Include them in the whitelist of
ignored names.

Closes #99

Change-Id: I2d3b22b4c3973f6d6f7996bc52b2f07dbe8ab97a
Reviewed-on: http://gerrit.causes.com/36646
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>