<commit_before># scss-lint-hdm
SCSS linter with custom rules from HDM
=======
##  SCSS-Lint

[![Gem Version](https://badge.fury.io/rb/scss_lint.svg)](http://badge.fury.io/rb/scss_lint)
[![Build Status](https://travis-ci.org/brigade/scss-lint.svg)](https://travis-ci.org/brigade/scss-lint)
[![Code Climate](https://codeclimate.com/github/brigade/scss-lint.png)](https://codeclimate.com/github/brigade/scss-lint)
[![Inline docs](http://inch-ci.org/github/brigade/scss-lint.svg?branch=master)](http://inch-ci.org/github/brigade/scss-lint)
[![Dependency Status](https://gemnasium.com/brigade/scss-lint.svg)](https://gemnasium.com/brigade/scss-lint)

`scss-lint` is a tool to help keep your [SCSS](http://sass-lang.com) files
clean and readable. You can run it manually from the command-line, or integrate
it into your [SCM hooks](https://github.com/brigade/overcommit).

### Installation
=======
=======
* [Requirements](#requirements)
* [Installation](#installation)
* [Usage](#usage)
* [Configuration](#configuration)
* [Formatters](#formatters)
* [Exit Status Codes](#exit-status-codes)
* [Linters](#linters)
* [Editor Integration](#editor-integration)
* [Git Integration](#git-integration)
* [Rake Integration](#rake-integration)
* [Maven Integration](#maven-integration)
* [Documentation](#documentation)
* [Contributing](#contributing)
* [Changelog](#changelog)
* [License](#license)

## Requirements

* Ruby 1.9.3+
* Sass 3.4.1+ (`scss-lint` 0.27.0 was the last version to support Sass 3.3)
* Files you wish to lint must be written in SCSS (not Sass) syntax

## Installation

```bash
gem install scss_lint
```

### Usage

Run `scss-lint` from the command-line by passing in a directory (or multiple
directories) to recursively scan:

```bash
scss-lint app/assets/stylesheets/
```

You can also specify a list of files explicitly:

```bash
scss-lint app/assets/stylesheets/**/*.css.scss
```

`scss-lint` will output any problems with your SCSS, including the offending
filename and line number (if available).

Command Line Flag         | Description
--------------------------|----------------------------------------------------
`-c`/`--config`           | Specify a configuration file to use
`-e`/`--exclude`          | Exclude one or more files from being linted
`-f`/`--format`           | Output format (see [Formatters](#formatters))
`-o`/`--out`              | Write output to a file instead of STDOUT
`-r`/`--require`          | Require file/library (mind `$LOAD_PATH`, uses `Kernel.require`)
`-i`/`--include-linter`   | Specify which linters you specifically want to run
`-x`/`--exclude-linter`   | Specify which linters you _don't_ want to run
`-h`/`--help`             | Show command line flag documentation
`--show-formatters`       | Show all available formatters
`--show-linters`          | Show all available linters
`-v`/`--version`          | Show version

## Configuration

`scss-lint` will automatically load the file `.scss-lint.yml` if one exists in
the current working directory merging it with the [default
configuration](config/default.yml). Otherwise, it uses the default
configuration as-is.

You can also specify that a specific configuration file be used via the
`--config` flag. It will still be merged with the default configuration.

Here's an example configuration file:

```yaml
scss_files: 'app/assets/stylesheets/**/*.css.scss'

exclude: 'app/assets/stylesheets/plugins/**'

linters:
  BorderZero:
    enabled: false

  Indentation:
    exclude:
      - 'path/to/file.scss'
      - 'path/to/directory/**'
    severity: warning
    width: 2
```

All linters have an `enabled` option which can be `true` or `false`, which
controls whether the linter is run, along with linter-specific options. The
defaults are defined in `config/default.yml`.<commit_msg>Update README with configuration loading order<commit_after># scss-lint-hdm
SCSS linter with custom rules from HDM
=======
##  SCSS-Lint

[![Gem Version](https://badge.fury.io/rb/scss_lint.svg)](http://badge.fury.io/rb/scss_lint)
[![Build Status](https://travis-ci.org/brigade/scss-lint.svg)](https://travis-ci.org/brigade/scss-lint)
[![Code Climate](https://codeclimate.com/github/brigade/scss-lint.png)](https://codeclimate.com/github/brigade/scss-lint)
[![Inline docs](http://inch-ci.org/github/brigade/scss-lint.svg?branch=master)](http://inch-ci.org/github/brigade/scss-lint)
[![Dependency Status](https://gemnasium.com/brigade/scss-lint.svg)](https://gemnasium.com/brigade/scss-lint)

`scss-lint` is a tool to help keep your [SCSS](http://sass-lang.com) files
clean and readable. You can run it manually from the command-line, or integrate
it into your [SCM hooks](https://github.com/brigade/overcommit).

### Installation
=======
=======
* [Requirements](#requirements)
* [Installation](#installation)
* [Usage](#usage)
* [Configuration](#configuration)
* [Formatters](#formatters)
* [Exit Status Codes](#exit-status-codes)
* [Linters](#linters)
* [Editor Integration](#editor-integration)
* [Git Integration](#git-integration)
* [Rake Integration](#rake-integration)
* [Maven Integration](#maven-integration)
* [Documentation](#documentation)
* [Contributing](#contributing)
* [Changelog](#changelog)
* [License](#license)

## Requirements

* Ruby 1.9.3+
* Sass 3.4.1+ (`scss-lint` 0.27.0 was the last version to support Sass 3.3)
* Files you wish to lint must be written in SCSS (not Sass) syntax

## Installation

```bash
gem install scss_lint
```

### Usage

Run `scss-lint` from the command-line by passing in a directory (or multiple
directories) to recursively scan:

```bash
scss-lint app/assets/stylesheets/
```

You can also specify a list of files explicitly:

```bash
scss-lint app/assets/stylesheets/**/*.css.scss
```

`scss-lint` will output any problems with your SCSS, including the offending
filename and line number (if available).

Command Line Flag         | Description
--------------------------|----------------------------------------------------
`-c`/`--config`           | Specify a configuration file to use
`-e`/`--exclude`          | Exclude one or more files from being linted
`-f`/`--format`           | Output format (see [Formatters](#formatters))
`-o`/`--out`              | Write output to a file instead of STDOUT
`-r`/`--require`          | Require file/library (mind `$LOAD_PATH`, uses `Kernel.require`)
`-i`/`--include-linter`   | Specify which linters you specifically want to run
`-x`/`--exclude-linter`   | Specify which linters you _don't_ want to run
`-h`/`--help`             | Show command line flag documentation
`--show-formatters`       | Show all available formatters
`--show-linters`          | Show all available linters
`-v`/`--version`          | Show version

## Configuration

`scss-lint` loads configuration in the following order of precedence:

1. Configuration file specified via the `--config` flag
2. Configuration from `.scss-lint.yml` in the current working directory,
   if it exists
3. Configuration from `.scss-lint.yml` in the user's home directory,
   if it exists
4. Otherwise, just the [default configuration](config/default.yml) is loaded

**Note**: The first configuration file found is the one that is loaded, e.g.
the `.scss-lint.yml` file in the current working directory is loaded _instead_
of the one in the user's home directory&mdash;they are not merged with each
other.

Here's an example configuration file:

```yaml
scss_files: 'app/assets/stylesheets/**/*.css.scss'

exclude: 'app/assets/stylesheets/plugins/**'

linters:
  BorderZero:
    enabled: false

  Indentation:
    exclude:
      - 'path/to/file.scss'
      - 'path/to/directory/**'
    severity: warning
    width: 2
```

All linters have an `enabled` option which can be `true` or `false`, which
controls whether the linter is run, along with linter-specific options. The
defaults are defined in `config/default.yml`.
{'fraction_non_alphanumeric': 0.16651825467497774, 'fraction_numerical': 0.0038163083577153036, 'mean_word_length': 3.6797619047619046, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1475398', 'n_tokens_mistral': 2613, 'n_tokens_neox': 2465, 'n_words': 707}