causes/scss-lint — pull request #313 by mmwtsn (2014-12-06 00:08:36+00:00)
Title: Adds leading_underscore option to NameFormat

This pull request adds support for allowing leading underscores to [denote private functions](https://github.com/thoughtbot/bourbon/blob/502c2108dea1970ffeb4f91cb95b545d67bddfd0/app/assets/stylesheets/helpers/_linear-angle-parser.scss#L2) while otherwise enforcing `hyphenated_lowercase`. It simply adds a `leading_underscore` convention option to `NameFormat`.

The visual diff of the unit tests look a little scary because the indentation changed. Here's what was updated:

1. I [wrapped the default `hyphenated_lowercase` examples](https://github.com/mmwtsn/scss-lint/blob/72df38ba8d8b42d65be82f861381b6bc37209551/spec/scss_lint/linter/name_format_spec.rb#L4) within a Rspec `shared_examples` group so that they could be called by both `hyphenated_lowercase` and `leading_underscore` as the majority of those unit tests are the same.

2. I then [called the shared example and added a function with a leading underscore](https://github.com/mmwtsn/scss-lint/blob/72df38ba8d8b42d65be82f861381b6bc37209551/spec/scss_lint/linter/name_format_spec.rb#L169-L195) to both the default and `leading_underscore` contexts to ensure that `@function _private-function() {}` is flagged by `hyphenated_lowercase` but not by `leading_underscore`.

Let me know if you have any suggestions! Thanks.