Skip to content

Commit 1c78773

Browse files
committed
Change language to rust to let pre-commit bootstrap rust
Add an empty cargo.toml to fool the build system
1 parent eeee35a commit 1c78773

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

.pre-commit-hooks.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
name: fmt
33
description: Format files with cargo fmt.
44
entry: cargo fmt
5-
language: system
5+
language: rust
66
types: [rust]
77
args: ["--"]
88
- id: cargo-check
99
name: cargo check
1010
description: Check the package for errors.
1111
entry: cargo check
12-
language: system
12+
language: rust
1313
types: [rust]
1414
pass_filenames: false
1515
- id: clippy
1616
name: clippy
1717
description: Lint rust sources
1818
entry: cargo clippy
19-
language: system
19+
language: rust
2020
args: ["--", "-D", "warnings"]
2121
types: [rust]
2222
pass_filenames: false

Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[package]
2+
name = "pre-commit-rust"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7+
8+
[dependencies]

src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
println!("Hello, world!");
3+
}

0 commit comments

Comments
 (0)