<commit_before># linter-elm-make

Lint your Elm files in Atom with [linter](https://atom.io/packages/linter) and `elm-make`.

![lint-on-fly](https://github.com/mybuddymichael/linter-elm-make/blob/master/images/lint-on-fly.gif?raw=true)

## Installation

1. Install [Elm](http://elm-lang.org/install).
1. Install [linter](https://atom.io/packages/linter), [language-elm](https://atom.io/packages/language-elm), and [linter-elm-make](https://atom.io/packages/linter-elm-make) from the Settings view (`Edit` > `Preferences` > `Install`) or by running these from the command line:

  ```
  apm install linter
  apm install language-elm
  apm install linter-elm-make
  ```

  Note: If you want to use [Nuclide](https://atom.io/packages/nuclide) in lieu of [linter](https://atom.io/packages/linter), check this [compatibility guide](https://nuclide.io/docs/advanced-topics/linter-package-compatibility).
1. Run `which elm-make` (Unix/Linux) or `where.exe elm-make` (Windows) from the command line and set the result as your executable path in this installed package's configuration.

## Configuration

#### `Lint On The Fly`
By default, linting is only done after saving the file.  If you want to lint while typing, turn on the `Lint On The Fly` option in the package settings.  Also make sure that the `Lint As You Type` option is enabled in the [linter](https://atom.io/packages/linter) package settings.

#### `Always Compile Main`
If enabled, the main file(s) will always be compiled instead of the active file.  The main files can be set using `Linter Elm Make: Set Main Paths`.  If not set, the linter will look for `Main.elm` files in the source directories.  Take note that if this is enabled, modules unreachable from the main modules will not be linted.  Disabled by default.

#### `Report Warnings`
Show `elm-make` warnings.  Enabled by default.

#### `Work Directory`
- If this is not blank, the linter will copy the source files from the project directory into this directory and use this as the working directory for `elm-make`.  This can be an absolute path or relative to the path of `elm-package.json`.

  If `Lint On The Fly` is disabled, this option will prevent the linter from using your project directory's `elm-stuff`.  This can be useful if you're using other tools to build your output files.

- If this is blank and `Lint On The Fly` is enabled, the linter will create a temporary directory before running the first linting process for the project.  It will then copy the source files from the project directory into the temporary directory.  The linter will do all of this again when Atom gets restarted.  Setting the value of `Work Directory` will shorten the duration of the first lint after a restart since the linter does not need to create a temporary directory and copy files anymore.

- If this is blank and `Lint On The Fly` is disabled, the linter will use the project directory as the working directory for `elm-make`.

If this option is not blank, a file watcher will watch the project directory for source file changes and synchronize those with the work directory.<commit_msg>Add note about how linting on the fly works<commit_after># linter-elm-make

Lint your Elm files in Atom with [linter](https://atom.io/packages/linter) and `elm-make`.

![lint-on-fly](https://github.com/mybuddymichael/linter-elm-make/blob/master/images/lint-on-fly.gif?raw=true)

## Installation

1. Install [Elm](http://elm-lang.org/install).
1. Install [linter](https://atom.io/packages/linter), [language-elm](https://atom.io/packages/language-elm), and [linter-elm-make](https://atom.io/packages/linter-elm-make) from the Settings view (`Edit` > `Preferences` > `Install`) or by running these from the command line:

  ```
  apm install linter
  apm install language-elm
  apm install linter-elm-make
  ```

  Note: If you want to use [Nuclide](https://atom.io/packages/nuclide) in lieu of [linter](https://atom.io/packages/linter), check this [compatibility guide](https://nuclide.io/docs/advanced-topics/linter-package-compatibility).
1. Run `which elm-make` (Unix/Linux) or `where.exe elm-make` (Windows) from the command line and set the result as your executable path in this installed package's configuration.

## Configuration

#### `Lint On The Fly`
By default, linting is only done after saving the file.  If you want to lint while typing, turn on the `Lint On The Fly` option in the package settings.  Also make sure that the `Lint As You Type` option is enabled in the [linter](https://atom.io/packages/linter) package settings.

NOTE: Linting on the fly is experimental and currently works by copying the source files to the `Work Directory` (or to a temporary directory if `Work Directory` is blank) and running `elm-make` there.

#### `Always Compile Main`
If enabled, the main file(s) will always be compiled instead of the active file.  The main files can be set using `Linter Elm Make: Set Main Paths`.  If not set, the linter will look for `Main.elm` files in the source directories.  Take note that if this is enabled, modules unreachable from the main modules will not be linted.  Disabled by default.

#### `Report Warnings`
Show `elm-make` warnings.  Enabled by default.

#### `Work Directory`
- If this is not blank, the linter will copy the source files from the project directory into this directory and use this as the working directory for `elm-make`.  This can be an absolute path or relative to the path of `elm-package.json`.

  If `Lint On The Fly` is disabled, this option will prevent the linter from using your project directory's `elm-stuff`.  This can be useful if you're using other tools to build your output files.

- If this is blank and `Lint On The Fly` is enabled, the linter will create a temporary directory before running the first linting process for the project.  It will then copy the source files from the project directory into the temporary directory.  The linter will do all of this again when Atom gets restarted.  Setting the value of `Work Directory` will shorten the duration of the first lint after a restart since the linter does not need to create a temporary directory and copy files anymore.

- If this is blank and `Lint On The Fly` is disabled, the linter will use the project directory as the working directory for `elm-make`.

If this option is not blank, a file watcher will watch the project directory for source file changes and synchronize those with the work directory.
{'fraction_non_alphanumeric': 0.08724624205795754, 'fraction_numerical': 0.0009298000929800093, 'mean_word_length': 4.24289195775792, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 18, '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': '4951424', 'n_tokens_mistral': 1819, 'n_tokens_neox': 1770, 'n_words': 884}