spacedrive/lefthook.yml
Ericson "Fogo" Soares 85e5eec993
Resumable Jobs + Lefthook Integration (#344)
* Introducing Lefthook for git hooks automation
* TypeScript typechecking and linting
* Rust formatting and linting
* Spellchecking (also corrected spell errors in some files)
* Check links in md files

* Introducing resumable jobs
* Abstractions to pause and resume jobs automatically when application exits and is started
* Changing database to use Bytes for UUID fields
* Changing uuid fields on core to use uuid::Uuid instead of String
* Updating some dependencies and introducing msg_pack serialization to save job state on database

* Fixing some clippy warnings

* Fixing a regression introduced on identifier job, doing too much db accesses concurrently
2022-07-27 00:06:34 -07:00

34 lines
1.3 KiB
YAML

########################################################################################################################
# Refer for explanation to following link: #
# https://github.com/evilmartians/lefthook/blob/master/docs/full_guide.md #
########################################################################################################################
pre-commit:
parallel: true
commands:
type-check:
glob: "*.{ts,tsx}"
run: pnpm typecheck
lint:
glob: '*.{ts,tsx}'
run: pnpm eslint {all_files}
spelling:
glob: '*.{ts,tsx,md,rs}'
run: pnpm cspell {staged_files}
markdown-link-check:
glob: '*.md'
run: pnpm markdown-link-check {staged_files}
rust-fmt:
glob: '*.rs'
run: cargo fmt --all -- --check
rust-lint-tauri:
run: cargo clippy --package spacedrive -- -D warnings
rust-lint-core:
run: cargo clippy --package sdcore --lib -- -D warnings
rust-lint-core-prisma:
run: cargo clippy --package prisma-cli -- -D warnings
rust-lint-core-derive:
run: cargo clippy --package core-derive --lib -- -D warnings
rust-lint-server:
run: cargo clippy --package server -- -D warnings