Skip to content

Commit

Permalink
docs: elaborate on file path syntax for exclude
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Nov 19, 2023
1 parent 0b4752d commit f841696
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,10 @@ pre-commit:

You can provide a regular expression to exclude some files from being passed to [`run`](#run) command.

The regular expression is matched against full paths to files in the repo,
relative to the repo root, using `/` as the directory separator on all platforms.
File paths do not begin with the separator or any other prefix.

**Example**

Run Rubocop on staged files with `.rb` extension except for `application.rb`, `routes.rb`, and `rails_helper.rb` (wherever they are).
Expand Down

0 comments on commit f841696

Please sign in to comment.