Skip to content

Commit

Permalink
Merge pull request #1 from kykosic/rust
Browse files Browse the repository at this point in the history
convert hook to rust
  • Loading branch information
kykosic authored Mar 27, 2023
2 parents edc8546 + b863e3d commit 6226812
Show file tree
Hide file tree
Showing 7 changed files with 507 additions and 138 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
target/
.DS_Store
__pycache__/
*.pyc

12 changes: 6 additions & 6 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
name: cargo fmt
description: Format rust files with cargo fmt
entry: pre_commit_rust fmt
language: python
language: rust
types: [rust]
minimum_pre_commit_version: 2.9.2
minimum_pre_commit_version: 2.21.0
require_serial: true
- id: cargo-check
name: cargo check
description: Run cargo check for compilation errors
entry: pre_commit_rust check
language: python
language: rust
types: [rust]
minimum_pre_commit_version: 2.9.2
minimum_pre_commit_version: 2.21.0
require_serial: true
- id: cargo-clippy
name: cargo clippy
description: Run cargo clippy lint tool
entry: pre_commit_rust clippy
language: python
language: rust
types: [rust]
minimum_pre_commit_version: 2.9.2
minimum_pre_commit_version: 2.21.0
require_serial: true
313 changes: 313 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "pre-commit-rust"
version = "0.3.0"
edition = "2021"
authors = ["Kyle Kosic <[email protected]>"]

[[bin]]
name = "pre_commit_rust"
path = "src/main.rs"

[dependencies]
anyhow = "1.0.70"
clap = { version = "4.1.13", features = ["derive"] }
glob = "0.3.1"
Loading

0 comments on commit 6226812

Please sign in to comment.