[package]
name = "jjpr"
version = "0.20.0"
edition = "2024"
rust-version = "1.91"
description = "Manage stacked pull requests in Jujutsu repositories"
license = "MIT OR Apache-2.0"
repository = "https://github.com/michaeldhopkins/jjpr"
keywords = ["jujutsu", "jj", "stacked-prs", "github", "gitlab"]
categories = ["development-tools"]

[[bin]]
name = "jjpr"
path = "src/main.rs"

[dependencies]
clap = { version = "4", features = ["derive"] }
anyhow = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
base64 = "0.22"
dialoguer = "0.11"
toml = "0.8"
percent-encoding = "2"
ureq = { version = "3", features = ["json"] }
vcs-runner = { version = "0.12.1", default-features = false }
ctrlc = "3"
libc = "0.2.183"

[dev-dependencies]
tempfile = "3"
assert_cmd = "2"
predicates = "3"
insta = "1"
clap_complete = "4"
clap_mangen = "0.2"

[lints.clippy]
# Enforce enums over boolean state flags
struct-excessive-bools = "deny"
fn-params-excessive-bools = "deny"

# Catch boolean patterns that could benefit from enums
match_bool = "warn"
bool_to_int_with_if = "warn"

# Complexity limits to catch functions that need refactoring
cognitive-complexity = "warn"
too-many-lines = "warn"

# Tightened to deny
collapsible-if = "deny"
too-many-arguments = "deny"

# Encourage idiomatic patterns
needless-range-loop = "deny"
extend_with_drain = "deny"

[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/v{ version }/jjpr-{ target }.tar.gz"
pkg-fmt = "tgz"
bin-dir = "jjpr"

[package.metadata.binstall.overrides.x86_64-pc-windows-msvc]
pkg-url = "{ repo }/releases/download/v{ version }/jjpr-{ target }.zip"
pkg-fmt = "zip"

[profile.dist]
inherits = "release"
lto = "thin"
