commit 57a76ea7f62861e752fb49d3d90d9b25f050dfd6 Author: Fadi Hadzh Date: Thu Apr 13 15:30:33 2017 +0300 feat: initial commit diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..78036da --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,11 @@ +- repo: https://github.com/pre-commit/pre-commit-hooks + sha: 5bf6c09bfa1297d3692cadd621ef95f1284e33c0 + hooks: + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace +- repo: https://github.com/pre-commit/pre-commit + sha: 1be4e4f82e31336fa5fca096c962c72ac0041537 + hooks: + - id: validate_config + - id: validate_manifest diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml new file mode 100644 index 0000000..797c823 --- /dev/null +++ b/.pre-commit-hooks.yaml @@ -0,0 +1,7 @@ +- id: fmt + name: fmt + description: Format files with rustfmt. + entry: rustfmt + language: system + files: \.(rs|rlib)$ + args: ['--write-mode=overwrite'] diff --git a/README.md b/README.md new file mode 100644 index 0000000..3de61de --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# Rust hooks for pre-commit + +[Rust](https://www.rust-lang.org) tools package for [pre-commit](http://pre-commit.com). + +## Using rust tools with pre-commit + +```yaml +- repo: git://github.com/doublify/pre-commit-rust + sha: master + hooks: + - id: fmt +``` diff --git a/hooks.yaml b/hooks.yaml new file mode 100644 index 0000000..797c823 --- /dev/null +++ b/hooks.yaml @@ -0,0 +1,7 @@ +- id: fmt + name: fmt + description: Format files with rustfmt. + entry: rustfmt + language: system + files: \.(rs|rlib)$ + args: ['--write-mode=overwrite']