mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-28 07:14:40 +08:00
96 lines
2.1 KiB
TOML
96 lines
2.1 KiB
TOML
[config]
|
|
skip_core_tasks = true
|
|
skip_git_env_info = true
|
|
skip_rust_env_info = true
|
|
skip_crate_env_info = true
|
|
|
|
# --- Backend ---
|
|
|
|
[tasks.rust-format]
|
|
install_crate = "rustfmt"
|
|
command = "cargo"
|
|
args = ["fmt", "--", "--emit=files"]
|
|
|
|
[tasks.rust-clippy]
|
|
description = "Run cargo clippy to lint the code"
|
|
command = "cargo"
|
|
args = ["clippy", "--all-targets", "--all-features", "--", "-D", "warnings"]
|
|
|
|
# --- Frontend ---
|
|
|
|
[tasks.format]
|
|
description = "Run code formatter"
|
|
command = "pnpm"
|
|
args = ["format"]
|
|
|
|
[tasks.format-check]
|
|
description = "Run format checks"
|
|
command = "pnpm"
|
|
args = ["format:check"]
|
|
|
|
[tasks.eslint]
|
|
description = "Run ESLint to lint the code"
|
|
command = "pnpm"
|
|
args = ["lint"]
|
|
|
|
[tasks.typecheck]
|
|
description = "Run type checks"
|
|
command = "pnpm"
|
|
args = ["typecheck"]
|
|
|
|
[tasks.lint-staged]
|
|
description = "Run lint-staged for staged files"
|
|
command = "pnpm"
|
|
args = ["exec", "lint-staged"]
|
|
|
|
[tasks.i18n-check]
|
|
description = "Check i18n consistency"
|
|
command = "pnpm"
|
|
args = ["i18n:types"]
|
|
|
|
# --- Jobs ---
|
|
|
|
# Rust format (for pre-commit)
|
|
[tasks.rust-format-check]
|
|
description = "Check Rust code formatting"
|
|
dependencies = ["rust-format"]
|
|
[tasks.rust-format-check.condition]
|
|
files_modified.input = [
|
|
"./src-tauri/**/*.rs",
|
|
"./crates/**/*.rs",
|
|
"**/Cargo.toml",
|
|
]
|
|
files_modified.output = ["./target/debug/*", "./target/release/*"]
|
|
|
|
# Rust lint (for pre-push)
|
|
[tasks.rust-lint]
|
|
description = "Run Rust linting"
|
|
dependencies = ["rust-clippy"]
|
|
[tasks.rust-lint.condition]
|
|
files_modified.input = [
|
|
"./src-tauri/**/*.rs",
|
|
"./crates/**/*.rs",
|
|
"**/Cargo.toml",
|
|
]
|
|
files_modified.output = ["./target/debug/*", "./target/release/*"]
|
|
|
|
# Frontend format (for pre-commit)
|
|
[tasks.frontend-format]
|
|
description = "Frontend format checks"
|
|
dependencies = ["lint-staged"]
|
|
|
|
# Frontend lint (for pre-push)
|
|
[tasks.frontend-lint]
|
|
description = "Frontend linting and type checking"
|
|
dependencies = ["eslint", "typecheck", "i18n-check"]
|
|
|
|
# --- Git Hooks ---
|
|
|
|
[tasks.pre-commit]
|
|
description = "Pre-commit checks: format only"
|
|
dependencies = ["rust-format-check", "frontend-format"]
|
|
|
|
[tasks.pre-push]
|
|
description = "Pre-push checks: lint and typecheck"
|
|
dependencies = ["rust-lint", "frontend-lint"]
|