---
name: rubocop
description: "Use when adopting RuboCop to assess this standard: Keep Ruby code within a shared lint policy"
---

# Apply RuboCop

Check selected cops against the Ruby versions the project supports. Keep existing exceptions explicit and review new diagnostics before applying autocorrection.

## Procedure

1. Inspect the repository configuration and identify the files or targets covered by RuboCop.
2. Use RuboCop in this repository to meet this standard: Keep Ruby code within a shared lint policy. Check selected cops against the Ruby versions the project supports. Keep existing exceptions explicit and review new diagnostics before applying autocorrection. Inspect the repository configuration, record the baseline and exact reproduction steps, then add the smallest repeatable check that detects a regression.
3. Record the tool version, configuration, scope and findings. Explain any checks that could not run.
4. Use the same invocation after changes and compare the evidence against the baseline.

Refer to [the upstream documentation](https://docs.rubocop.org/) for configuration and prerequisites.

## Tool invocation

```
bundle exec rubocop
```
