Skip to content

LoKolbasz/pre-commit-rust

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Rust hooks for pre-commit

Rust tools package for pre-commit.

Usage

Install pre-commit: pip install pre-commit

Create .pre-commit-config.yaml in your main project dir with the following content:

- repo: https://github.com/LoKolbasz/pre-commit-rust
  rev: v1.0
  hooks:
  - id: fmt
  - id: clippy
  - id: cargo-check
  - id: cargo-test

Choose plugins and their order from the above list as needed.

Then run:

$ pre-commit install
$ pre-commit run --all-files

After that you it will be checked before each commit.

Passing arguments to rustfmt

- repo: https://github.com/LoKolbasz/pre-commit-rust
  rev: v1.0
  hooks:
  - id: fmt
    args: ['--verbose', '--edition', '2018', '--']

About

Rust hooks for pre-commit

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors