# atmos validate editorconfig

Use this command to validate files against the rules defined in .editorconfig file.

**Configure EditorConfig Validation**

Learn how to configure EditorConfig validation settings, exclusions, and disabled checks in your atmos.yaml.

Configuration Reference[Read more](/cli/configuration/validate)

## Usage

Execute the `validate editorconfig` command like this:

```shell
atmos validate editorconfig
```

This command validates files against the formatting rules defined in your .editorconfig file.

:::tip
Run `atmos validate editorconfig --help` to see all the available options
:::

## Examples

```shell
atmos validate editorconfig
atmos validate editorconfig --logs-level Trace
atmos validate editorconfig --no-color
atmos validate editorconfig --dry-run
atmos validate editorconfig --format sarif > editorconfig.sarif

# Source excerpts for local or CI logs
atmos validate editorconfig --format rich
atmos validate editorconfig --ci
atmos validate editorconfig --affected --base origin/main
```

`--affected` checks only files changed since the Git merge-base. Changing an
EditorConfig rule file validates the complete project because the rule can apply
to every file. GitHub Actions automatically uses the pull request base SHA;
use `--base` locally to choose a comparison point.

## Flags

- **`--config` (optional)**
  Path to the configuration file (e.g., 
  `.editorconfig`
  , 
  `.editorconfig-checker.json`
  , 
  `.ecrc`
  ).
- **`--disable-end-of-line` (optional)**
  Disable end-of-line check (default 
  `false`
  ).
- **`--disable-indent-size` (optional)**
  Disable indent size check (default 
  `false`
  ).
- **`--disable-indentation` (optional)**
  Disable indentation check (default 
  `false`
  ).
- **`--disable-insert-final-newline` (optional)**
  Disable final newline check (default 
  `false`
  ).
- **`--disable-max-line-length` (optional)**
  Disable max line length check (default 
  `false`
  ).
- **`--disable-trim-trailing-whitespace` (optional)**
  Disable trailing whitespace check (default 
  `false`
  ).
- **`--dry-run` (optional)**
  Show which files would be checked (default 
  `false`
  ).
- **`--exclude` (optional)**
  Regex to exclude files from checking.
- **`--format` (optional)**
  Specify the output format: 
  `default`
  , 
  `gcc`
  , 
  `codeclimate`
  , 
  `github-actions`
  , 
  `sarif`
  , or 
  `rich`
   (default 
  `default`
  ). 
  `sarif`
   and 
  `rich`
   are rendered by Atmos; the other formats are provided by EditorConfig Checker. The flag overrides 
  `ATMOS_VALIDATE_FORMAT`
  , which overrides 
  `validate.editorconfig.format`
  , then 
  `validate.format`
  , in 
  `atmos.yaml`
  .
- **`--ci` (optional)**
  Enable CI annotations. SARIF is uploaded only when 
  `ci.enabled`
   and 
  `ci.results.enabled`
   are enabled in 
  `atmos.yaml`
  .
- **`--help` (optional)**
  help for editorconfig.
- **`--ignore-defaults` (optional)**
  Ignore default excludes (default 
  `false`
  ).
- **`--init` (optional)**
  Create an initial configuration (default 
  `false`
  ).
- **`--no-color` (optional)**
  Don't print colors (default 
  `false`
  ).
- **`--version` (optional)**
  Print the version number (default 
  `false`
  ).
