# format/editorconfig-checker

> Checks line endings, final newlines, and trailing whitespace in every file against .editorconfig.

Checks line endings, final newlines, and trailing whitespace in every file against .editorconfig.

Part of the [`format`](/reference/configurations/format/) configuration, at the `recommended` [level](/start/concepts/#levels). It runs at the `commit` [stage](/start/concepts/#stage), per file. It runs editorconfig-checker.

## Why

These rules cover the files no formatter touches, so a stray tab or missing newline never lands in a diff. The formatters handle indentation.

## What to do

Fix the line the checker names; most editors apply .editorconfig on save.

## Example

A file with CRLF line endings under an `.editorconfig` that requires LF reports a finding. Save it with LF endings.

## Turn it off

Turn it off for some files, or one of its lint rules, with a reason:

```shell
gspot ignore format/editorconfig-checker --paths "<glob>" --reason "<why>"
gspot ignore format/editorconfig-checker --rule <rule> --reason "<why>"
```
