Add support for excluding YAML frontmatter

Add support for excluding frontmatter settings common in many static
site generators like Middleman and Jekyll. It's controlled by a new
global config option 'skip_frontmatter', which defaults to false so it's
opt-in.

Change-Id: I664e618c8acc3c49aa65686579b5fec7e2e1aeba
Reviewed-on: http://gerrit.causes.com/42551
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Indent heredocs in Parser spec

Heredocs that aren't indented are more difficult to read. Fix that by
indenting them and using the `normalize_indent` helper to avoid a parse
error.

Change-Id: Ia8cde89109290a548f421ad1db642e9c7926c7a4
Reviewed-on: http://gerrit.causes.com/42552
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Relax Parser raise_error expectation

Checking for a specific error string is brittle unless we are
intentionally verifying the contents of the string because it is
something we generate ourselves.

Relax the check by merely verifying that a `Haml::Error` was raised.

Change-Id: I28cab926e5818d6532bea6be87eb5fbb16f06042
Reviewed-on: http://gerrit.causes.com/42553
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Extract parser options processing into helper

This was making the initializer a bit long. Extract into a helper as
it's ancillary to general initialization.

Change-Id: I0be2064a1c1a9632f5dd4eb8c00f347a6827852c
Reviewed-on: http://gerrit.causes.com/42554
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Add some documentation for parser

YARD is great. We should use it more.

Change-Id: Ibe4c2e46e6659956023cba1fe025f7c69414517f
Reviewed-on: http://gerrit.causes.com/42555
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Fix broken parser spec on Ruby 1.9.3

The behavior of `raise_error` with just the class name is strange on
Ruby 1.9.3, in that it doesn't recognize that `Haml:Error` is indeed the
same class as the actual exception.

This appears to be a bug not worth pursuing at this time, so change to
using a regex.

Change-Id: I0f17b3bc33ba08d1dc1fc45103b16127062b4e98
Reviewed-on: http://gerrit.causes.com/42556
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Switch to indented access modifiers style

This style seems to have won favor in the general community. Switch to
it.

Change-Id: I739c914adbbb6db2380c287872cf10b308275e43
Reviewed-on: http://gerrit.causes.com/42557
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Upgrade Travis build RuboCop from 0.25.0 -> 0.26.0

For the purposes of linting `haml-lint` itself, upgrade to the latest
RuboCop version.

Change-Id: I75e83591a670608b5c5cd07446e245d6339e6aa6
Reviewed-on: http://gerrit.causes.com/42558
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Add skip_frontmatter documentation

Change-Id: Icb4386b49dca34813cf3743f4bbb5dac26d0d2f1
Reviewed-on: http://gerrit.causes.com/42559
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Remove Linter#message

We don't want to use this method of defining a default lint message, as
it's a little silly to define a public method that only gets used
internally.

Convert the only use of this method to a CONSTANT definition.

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