mirror of
https://github.com/eza-community/eza
synced 2024-06-29 06:24:58 +00:00
feat: add non-nix pre-commit rustfmt and clippy hooks
fix: correct nix pre-commit, update instructions chore: rename non-nix pre commit cfg and update docs to reflect
This commit is contained in:
parent
99b2fc214e
commit
e3eeb2c5d3
15
.pre-commit-config-non-nix.yaml
Normal file
15
.pre-commit-config-non-nix.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
repos:
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: rust-linting
|
||||
name: Rust linting
|
||||
description: Run rustfmt on included files
|
||||
entry: cargo fmt --
|
||||
types: [file, rust]
|
||||
language: system
|
||||
- id: rust-clippy
|
||||
name: Rust clippy
|
||||
description: Run clippy on included files
|
||||
entry: cargo clippy --workspace --all-targets --all-features --
|
||||
types: [file, rust]
|
||||
language: system
|
|
@ -44,6 +44,11 @@ Some useful commands include:
|
|||
pre-commit-hooks.nix
|
||||
- `just itest`: runs integration tests
|
||||
|
||||
**For non-nix users,**
|
||||
There are traditional `pre-commit` hooks, which you can install with your system package manager or
|
||||
`brew|pip install pre-commit`, and run `pre-commit install -c .pre-commit-config-non-nix.yaml` in the root of the repository.
|
||||
Then these hooks will run automatically when you commit.
|
||||
|
||||
The [just](https://github.com/casey/just) command runner can be used to run some
|
||||
helpful development commands, in a manner similar to `make`. Run `just --list`
|
||||
to get an overview of what’s available.
|
||||
|
|
Loading…
Reference in New Issue
Block a user