Update XmlReporter to XML encode attribute strings

Avoids problem where filename or description contains illegal XML
characters (like an ampersand) by escaping the output.

Change-Id: I161de23cd8d52d5b8bab540457fd5fcb4d44add9
Reviewed-on: http://gerrit.causes.com/37215
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Add XML chars to 'reason' in XmlReporter test

This test modification verifies that the XML-encoding of attributes in
`XmlReporter` is working, since without that, the test would fail (due
to problems parsing out attributes containing quotes).

Change-Id: I839a06d242ff406551699f6dc582da4b90e74097
Reviewed-on: http://gerrit.causes.com/37217
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Update README to use double-quotes in XML example

This matches the updates to the XML reporter, since Ruby uses
double-quotes for its XML-attribute string-encodings.

Change-Id: If7d3925a762861e998152fff801c8d9bec5f90cd
Reviewed-on: http://gerrit.causes.com/37216
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Update changelog with XMLReporter bug fix

Change-Id: I34f752fbcb019ec246b1d5ba7005c5d5451a90be
Reviewed-on: http://gerrit.causes.com/37218
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Fix ZeroUnit regex for colors and decimals

The `ZeroUnit` linter would incorrectly report a lint for values like
`#0af` or `4.0em`.

This was solved by adding a negative lookbehind for the `#` or `.`
characters.

Change-Id: Iab90d77155fb7ccc666fccd9524f18be14cb23b7
Reviewed-on: http://gerrit.causes.com/37219
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Fix Shorthand linter with !important overrides

Fix bug in `Shorthand` linter where `!important` priority overrides
would prevent lints from being reported.

Solved by modifying the regex to exclude the `!important` declaration.

Change-Id: I53fee75da8590d43a4138df1fe6afabaa1e17f7d
Reviewed-on: http://gerrit.causes.com/37220
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Add UnnecessaryMantissa linter

Checks for the unnecessary use of a zero-value fractional component
(a.k.a mantissa) in a number. Thus it will prefer "4" over "4.0".

Change-Id: Ic174a6ef17533bfc9f8072198d7f8b3a5697328a
Reviewed-on: http://gerrit.causes.com/37221
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Add column and length information to Lint

As noted in id_with_extraneous_selector.rb,
Sass::Selector::SimpleSequence#source_range sometimes lies about its
line. So for now the linter reports the line number with
SimpleSequence#line and discards column and length information.

Change-Id: Ibc71b5662a0797046230287a4ff40b61fffb01a0
Reviewed-on: http://gerrit.causes.com/37222
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Support column and length in XMLReporter

Change-Id: Ibe3a3f9012a9453e0ed9cea47f8b54afba2d6dd9
Reviewed-on: http://gerrit.causes.com/37223
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Clean up new Location code

Modify the grammar of some comments and spec descriptions.

Change-Id: I3ea4c82c6bb0e71372add6f451755dbf0017ec09
Reviewed-on: http://gerrit.causes.com/37224
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Add pkg directory to .gitignore

Now that the Bundler gem tasks have been added to the rake file, we
don't want to accidentally commit anything in the `pkg` directory.

Change-Id: Ia199ce9ae07fa56362103ad4ec40a20f72b92119
Reviewed-on: http://gerrit.causes.com/37225
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Update changelog for XMLReporter column/length info

Change-Id: Ia3f1b45d3f92d1226f2680f1d5b738358480d24a
Reviewed-on: http://gerrit.causes.com/37226
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Inspect parse tree directly in SpaceBeforeBrace

The `SpaceBeforeBrace` linter suffered from a class of bugs where a
false positive would be reported for braces that weren't actually
opening braces (e.g. braces in comments).

This was due to the naive regex implementation that did not take the
parse tree into account.

Fix this problem by inspecting the parse tree directly.

Change-Id: I1e10970553a30fa2d0fb0bd73ad802a1a8c02806
Reviewed-on: http://gerrit.causes.com/37227
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Add inline-block check to Compass::PropertyWithMixin

See http://compass-style.org/reference/compass/css3/inline_block/

Change-Id: I3b82f4b67050d8186b87c6d751b1e5e0f2362864
Reviewed-on: http://gerrit.causes.com/37269
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Cleanup inline-block mixin check

  * Change double quotes to singles
  * Remove Law of Demeter violation
  * Reword spec description
  * Add a changelog entry

Change-Id: If5527ca8819fd0985f9db001f9c70dbffa819b1a
Reviewed-on: http://gerrit.causes.com/37270
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Add DuplicateRoot linter

Closes #109

Change-Id: I8f7a16aadfff132385cd18fcbe03050f0f97d63f
Reviewed-on: http://gerrit.causes.com/37417
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Clean up DuplicateRoot code and docs

Minor code style tweaks and rewording of documentation.

Change-Id: If7bcd1c0962bc41114964c5d4e398b84c7532f88
Reviewed-on: http://gerrit.causes.com/37418
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Fix DuplicateRoot handling of subtrees

There was a bug where the `DuplicateRoot` linter would suggest merging
rules declared within nested subtrees with root rules, e.g.

    p { ... }

    @include some-mixin {
      p { ... } // This gets flagged as a duplicate of above
    }

Fix this by adding stub implementations for the various subtree node
types so we don't recurse into them.

Change-Id: I7c55cae3949d85dfa306f7cf2f65fe66b292d262
Reviewed-on: http://gerrit.causes.com/37419
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>
Add EditorConfig with whitespace conventions

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

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