# The Baseline

The baseline allows teams to use Phecks as an ideal codebase, and not be restricted by legacy code that is awaiting a refactor.

It provides a fresh start so the new code is introduced using the agreed standard, and it still allows you to ignore it in case you want to address already ignored violations.

### Generating the baseline <a href="#generating-the-baseline" id="generating-the-baseline"></a>

If you want to export the current list of errors and use it as the baseline, run Phecks with `--generate-baseline` option:

```bash
php artisan phecks:run --generate-baseline
```

{% hint style="info" %}
You can change the location of the baseline file by [editing the configuration](https://juampi92.gitbook.io/phecks/user-guide/configuration).
{% endhint %}

### Ignoring the baseline

The baseline will always be applied if present. In order to skip it, run Phecks with `--ignore-baseline` option:

```
php artisan phecks:run --ignore-baseline
```
