Skip to content

noonsleeper/pre-commit-rust

 
 

Repository files navigation

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.

About

Rust hooks for pre-commit

Resources

Stars

Watchers

Forks

Packages

No packages published