# code · Chromia Docs (concept)

> You can use the code command (chr code) for code quality management (formatting and linting).

Source: https://docs.chromia.com/build/cli/commands/code/

# code

Plain text

```
Usage: chr code [OPTIONS] COMMAND [ARGS]...

  Code quality management (checking, formatting, linting)

╭─ Options ───────────────────────────────────────────────────────────────────╮
│  -h, --help  Show this message and exit                                     │
╰─────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────╮
│  lint    Analyze Rell code to find potential issue and coding style         │
│          violations. Configurable using .rell_lint file                     │
│  format  Automatically format Rell code. Configurable using .rell_format    │
│          file                                                               │
│  check   Check Rell code for compilation errors                             │
╰─────────────────────────────────────────────────────────────────────────────╯
```

You can use the code command (`chr code`) for code quality management (formatting and linting).

## code lint

Plain text

```
Usage: chr code lint [<options>] [<files>]...

  Analyze Rell code to find potential issue and coding style violations.
  Configurable using .rell_lint file

Configuration Properties:
  -s, --settings=<settings>  Alternate path for project settings file

Options:
  --source-dir=<path>           source directory
  -fo, --formatter-options=<path>
                                Formatter options file (default '.rell_format')
  -lo, --linter-options=<path>  Linter options file (default '.rell_lint')
  --fix                         Fix all auto-fixable issues
  -h, --help                    Show this message and exit

Arguments:
  <files>  Files or dirs to show/fix linter issues from. (*.rell: All files
           ending with rell extension) (main/*: Matches all files in main
           directory on explicit path) (**/main/*: Matches all files in main
           directory independent on parent paths)
```

The lint command `chr code lint` allows you to analyze Rell code to find potential issue and coding style.

## code format

Plain text

```
Usage: chr code format [<options>] [<files>]...

  Automatically format Rell code. Configurable using .rell_format file

Configuration Properties:
  -s, --settings=<settings>  Alternate path for project settings file

Options:
  --source-dir=<path>  source directory
  --file=<path>        single Rell file
  -fo, --formatter-options=<path>
                       Formatter options file (default '.rell_format')
  -h, --help           Show this message and exit

Arguments:
  <files>  Files or dirs to format (*.rell: All files ending with rell
           extension) (main/*: Matches all files in main directory on explicit
           path) (**/main/*: Matches all files in main directory independent on
           parent paths)
```

The format command `chr code format` allows you to automatically format Rell code. It can be configured by using
`.rell_format`.

## code check

Plain text

```
Usage: chr code check [<options>]

  Check Rell code for compilation errors

Configuration Properties:
  -s, --settings=<settings>  Alternate path for project settings file

Options:
  --hide-lib-warnings  Hide library warnings in build output
  -h, --help           Show this message and exit
```

The check command `chr code check` allows you to check Rell code for potential issues and style violations.

[View this page on docs.chromia.com](https://docs.chromia.com/build/cli/commands/code/)Content mirrored from the live docs
