> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stratalint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# strata check

> Evaluate the configured rules against your repository and report every fault.

`strata check` is the core command. It loads your configuration, discovers the
files in each scope, runs the selected rules, and reports every fault it finds. It
is the command you wire into CI.

```bash theme={null}
strata check [paths...] [--no-color]
```

## Usage

Run against the repository described by your `strata.toml` or `[tool.strata]`:

```bash theme={null}
strata check
```

Strata finds your [configuration](/concepts/configuration) by searching upward from
the current directory, sorts files into the product, test, and tooling
[scopes](/concepts/architecture-model#scopes), and applies each scope's rules.

## Arguments and options

| Argument     | Description                                                    |
| ------------ | -------------------------------------------------------------- |
| `paths...`   | Optional. Check these paths instead of the configured `roots`. |
| `--no-color` | Disable ANSI color in the output.                              |

Passing paths overrides the roots for that run only; the rest of the configuration
(select, ignore, thresholds, contracts) still applies. Color is enabled
automatically when the output is a terminal and disabled otherwise, and `--no-color`
forces it off.

```bash theme={null}
strata check src/my_package/main
```

## Output

When the repository conforms, Strata prints a summary and nothing else:

```text theme={null}
Found 0 faults
```

When it finds problems, it prints one diagnostic per fault, then the summary. Each
diagnostic has a stable, editor-friendly shape:

```text theme={null}
SFA002  function 'run' must define a return type annotation
 --> src/my_package/main/run.py:5:0
  |
5 | def run(a, b):
  | ^
  |
  = help: Declare the returned value type, using None when the function returns no value.
```

* The first line is the rule code and the **message**: the concrete contract that
  was violated.
* The `-->` line is the location as `path:line:column`, repository-relative so an
  editor can make it clickable. A file-level fault with no specific line shows `-`
  for the line and column.
* The source excerpt shows the offending line with a caret under the exact column.
* The `= help:` line is the **remediation**: the normal correction, wrapped at 100
  columns.

This two-level message contract (what is wrong, and how to fix it) is the same
whether the fault comes from a core rule or a [custom rule](/concepts/custom-rules),
and the text is written to be read at the moment of violation by a person or an
agent.

## Exit codes

| Code | Meaning                   |
| ---- | ------------------------- |
| `0`  | No faults found.          |
| `1`  | One or more faults found. |

Because a non-zero exit fails a CI job, adding `strata check` to your pipeline turns
architectural drift into a build failure.

## Selecting what runs

`strata check` runs the rules resolved from your `select` and `ignore`
configuration. To narrow a run, adjust those keys rather than the command:

```toml theme={null}
select = ["SFL", "SFR"]   # only layers and roles
ignore = ["SFX007"]       # minus one rule
```

There is no inline suppression comment. When a rule genuinely does not fit, you
disable it, scope it off, or replace it with a custom rule, all in configuration.
See [Philosophy](/philosophy#how-to-deviate) for why.

## Related

<CardGroup cols={2}>
  <Card title="Configuration" icon="gear" href="/concepts/configuration">
    Scopes, selection, thresholds, and contracts.
  </Card>

  <Card title="Rule families" icon="list-check" href="/concepts/rule-families">
    What each rule checks.
  </Card>

  <Card title="strata rule" icon="magnifying-glass" href="/cli/rule">
    Inspect the full metadata for any code in the output.
  </Card>

  <Card title="strata map" icon="diagram-project" href="/cli/map">
    See the structure that check enforces.
  </Card>
</CardGroup>
