Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info

- name: Upload coverage to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7
with:
files: lcov.info
fail_ci_if_error: true
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

# Demo database and file number directories
*.db
trackers/
trackers/
9 changes: 9 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
lint:
prek run --all-files

test:
cargo test

coverage:
cargo tarpaulin --target-dir target/coverage --skip-clean
xdg-open tarpaulin-report.html
24 changes: 24 additions & 0 deletions prek.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[[repos]]
repo = "builtin"
hooks = [
{ id = "check-added-large-files", exclude = "^Cargo.lock$" },
{ id = "check-merge-conflict" },
{ id = "check-toml" },
{ id = "end-of-file-fixer" },
{ id = "mixed-line-ending", args = ["--fix", "lf" ]},
{ id = "trailing-whitespace", exclude = "static/service_schema.graphql"},
]

[[repos]]
repo = "local"
hooks = [
# fmt needs to be called via rustup to support nightly
{ id = "format", name = "cargo fmt", entry = "rustup run nightly cargo fmt", language = "rust", pass_filenames = false },
{ id = "compile", name = "cargo check", entry = "cargo check", language = "rust", pass_filenames = false },
{ id = "lint", name = "cargo clippy", entry = "cargo clippy --all-targets --all-features -- --deny warnings", language = "rust" , pass_filenames = false },
]

[[repos]]
repo = "https://github.com/gitleaks/gitleaks"
rev = "v8.30.1"
hooks = [{ id = "gitleaks" }]
Loading