Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,44 @@ Both formats are first-class and will be supported long-term. They describe the
```toml
[[repos]]
repo = "https://github.com/pre-commit/pre-commit-hooks"
hooks = [{ id = "trailing-whitespace" }]
rev = "v6.0.0"
hooks = [
{ id = "trailing-whitespace" },
{ id = "check-toml" },
]

[[repos]]
repo = "local"
hooks = [
{
id = "cargo-fmt",
name = "cargo fmt",
language = "system",
entry = "cargo fmt --",
types = ["rust"],
pass_filenames = false,
},
]
```

=== ".pre-commit-config.yaml"

```yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: check-toml

- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
language: system
entry: cargo fmt --
types: [rust]
pass_filenames: false
```

## Global configuration
Expand Down