summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Anshul Gupta <ansg191@anshulg.com> 2024-02-11 21:27:46 -0800
committerGravatar Anshul Gupta <ansg191@anshulg.com> 2024-02-11 21:27:46 -0800
commit2a2b11adbfa7096348f9ae602de735f6ccd27f0f (patch)
tree016cb1fbdd8df2896ffd203e3cd5ce7a5ab89419
parentccc88a8b8a8f7ce9edf554d1a694f9a640ff75d5 (diff)
downloadtrakt-2a2b11adbfa7096348f9ae602de735f6ccd27f0f.tar.gz
trakt-2a2b11adbfa7096348f9ae602de735f6ccd27f0f.tar.zst
trakt-2a2b11adbfa7096348f9ae602de735f6ccd27f0f.zip
Adds pre-commit
-rw-r--r--.pre-commit-config.yaml19
-rw-r--r--Cargo.toml2
2 files changed, 20 insertions, 1 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000..4eeda62
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,19 @@
+repos:
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v4.5.0
+ hooks:
+ - id: trailing-whitespace
+ - id: end-of-file-fixer
+ - id: check-added-large-files
+ - id: check-case-conflict
+ - id: check-merge-conflict
+ - id: check-symlinks
+ - id: check-toml
+ - id: forbid-submodules
+ - id: mixed-line-ending
+ - repo: https://github.com/ansg191/pre-commit-rust
+ rev: v1.1
+ hooks:
+ - id: fmt
+ - id: cargo-check
+ - id: clippy
diff --git a/Cargo.toml b/Cargo.toml
index 90ba985..8e7b7b7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,3 +1,3 @@
[workspace]
members = ["trakt", "trakt_macros"]
-resolver = "2" \ No newline at end of file
+resolver = "2"