Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 695 Bytes

README.md

File metadata and controls

28 lines (21 loc) · 695 Bytes

Rust hooks for pre-commit

Rust tools package for pre-commit.

This is a fork of doublify/pre-commit-rust.

Using rust tools with pre-commit

- repo: https://github.com/noonsleeper/pre-commit-rust
  rev: master
  hooks:
  - id: fmt
  - id: cargo-check
  - id: clippy

Passing arguments to rustfmt

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

Note: Cargo fmt picks up "edition" automatically from Cargo.toml, so specificying this isn't necessary in most cases.