[package] name = "pre-commit-rs" version = "0.0.5" authors = ["j178 "] description = "pre-commit implemeneted in Rust" repository = "https://github.com/j178/pre-commit-rs" homepage = "https://github.com/j178/pre-commit-rs" edition = "2021" license-file = "LICENSE" # `cargo publish` failed because of this, disabled for now. # include = ["licenses/.*"] [[bin]] path = "src/main.rs" name = "pre-commit" [features] default = ["docker"] profiler = ["dep:pprof", "profiler-flamegraph"] profiler-flamegraph = ["pprof/flamegraph"] docker = [] [dependencies] anstream = "0.6.15" anyhow = "1.0.86" assert_cmd = { version = "2.0.16", features = ["color"] } axoupdater = { version = "0.8.1", default-features = false, features = [ "github_releases"] } clap = { version = "4.5.16", features = ["derive", "env"] } clap_complete = "4.5.37" ctrlc = "3.4.5" dunce = "1.0.5" fancy-regex = "0.14.0" fs-err = "2.11.0" fs2 = "0.4.3" futures = "0.3.31" home = "0.5.9" http = "1.1.0" indicatif = "0.17.8" indoc = "2.0.5" itertools = "0.13.0" md5 = "0.7.0" miette = { version = "7.2.0", features = ["owo-colors", "textwrap"] } owo-colors = "4.1.0" rand = "0.8.5" rayon = "1.10.0" rusqlite = { version = "0.32.1", features = ["bundled"] } serde = { version = "1.0.210", features = ["derive"] } serde_json = "1.0.132" serde_yaml = "0.9.34" shlex = "1.3.0" tempfile = "3.13.0" textwrap = "0.16.1" thiserror = "1.0.64" tokio = { version = "1.40.0", features = ["process", "rt", "sync"] } tracing = "0.1.40" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } unicode-width = "0.2.0" url = { version = "2.5.2", features = ["serde"] } which = "6.0.3" [target.'cfg(unix)'.dependencies] libc = "0.2.164" pprof = { version = "0.14.0", optional = true } [dev-dependencies] assert_fs = "1.1.2" etcetera = "0.8.0" insta = { version = "1.40.0", features = ["filters"] } insta-cmd = "0.6.0" predicates = "3.1.2" regex = "1.11.0" [lints.rust] dead_code = "allow" [lints.clippy] pedantic = { level = "warn", priority = -2 } # Allowed pedantic lints char_lit_as_u8 = "allow" collapsible_else_if = "allow" collapsible_if = "allow" implicit_hasher = "allow" map_unwrap_or = "allow" match_same_arms = "allow" missing_errors_doc = "allow" missing_panics_doc = "allow" module_name_repetitions = "allow" must_use_candidate = "allow" similar_names = "allow" too_many_arguments = "allow" too_many_lines = "allow" used_underscore_binding = "allow" # Disallowed restriction lints print_stdout = "warn" print_stderr = "warn" dbg_macro = "warn" empty_drop = "warn" empty_structs_with_brackets = "warn" exit = "warn" get_unwrap = "warn" rc_buffer = "warn" rc_mutex = "warn" rest_pat_in_fully_bound_structs = "warn" [profile.bench] opt-level = 3 debug = true # used by the profiler strip = false # keep symbols for the profiler # The profile that 'cargo dist' will build with [profile.dist] inherits = "release" lto = "thin" [package.metadata.dist] dist = true # Config for 'dist' [workspace.metadata.dist] # The preferred dist version to use in CI (Cargo.toml SemVer syntax) cargo-dist-version = "0.25.1" # The archive format to use for non-windows builds (defaults .tar.xz) unix-archive = ".tar.gz" # CI backends to support ci = "github" # Whether CI should include auto-generated code to build local artifacts build-local-artifacts = false # Whether CI should trigger releases with dispatches instead of tag pushes dispatch-releases = true # Which actions to run on pull requests pr-run-mode = "plan" # Which phase dist should use to create the GitHub release github-release = "announce" # The installers to generate for each app installers = ["shell", "powershell", "homebrew"] # Target platforms to build apps for (Rust target-triple syntax) targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"] # Local artifacts jobs to run in CI local-artifacts-jobs = ["./build-binaries"] # Publish jobs to run in CI publish-jobs = ["./publish", "homebrew"] # A GitHub repo to push Homebrew formulas to tap = "j178/homebrew-tap" # Customize the Homebrew formula name formula = "pre-commit-rs" # Whether to install an updater program install-updater = false # Path that installers should place binaries in install-path = ["$XDG_BIN_HOME/", "$XDG_DATA_HOME/../bin", "~/.local/bin"]