[package]
name = "catnap"
version = "0.1.0"
edition = "2024"
description = "Visual CLI sleep"
license = "ISC"
repository = "https://github.com/leynos/catnap"
homepage = "https://github.com/leynos/catnap"
readme = "README.md"
keywords = ["rust", "timer", "cli"]
categories = ["command-line-utilities"]

[dependencies]
sys-locale = "0.3.2"
thiserror = "2.0.18"

# The package.metadata.binstall pkg-url intentionally mixes Jinja2 values
# rendered at project generation with single-brace cargo-binstall variables
# substituted at install time.
[package.metadata.binstall]
pkg-url = "https://github.com/leynos/catnap/releases/download/v{ version }/catnap-{ target }{ binary-ext }"
pkg-fmt = "bin"
disabled-strategies = ["quick-install", "compile"]

[lints.clippy]
pedantic = { level = "warn", priority = -1 }

# 1. hygiene
allow_attributes                    = "deny"
allow_attributes_without_reason     = "deny"
blanket_clippy_restriction_lints    = "deny"
cognitive_complexity                = "deny"
needless_pass_by_value              = "deny"
implicit_hasher                     = "deny"

# 2. debugging leftovers
dbg_macro                           = "deny"
print_stdout                        = "deny"
print_stderr                        = "deny"

# 2. panic-prone operations
unwrap_used                         = "deny"
expect_used                         = "deny"
indexing_slicing                    = "deny"
string_slice                        = "deny"
integer_division                    = "deny"
integer_division_remainder_used     = "deny"
panic_in_result_fn                  = "deny"
unreachable                         = "deny"

# 4. portability
host_endian_bytes                   = "deny"
little_endian_bytes                 = "deny"
big_endian_bytes                    = "deny"

# 5. nursery idiom polish
let_underscore_must_use             = "deny"
or_fun_call                         = "deny"
option_if_let_else                  = "deny"
self_named_module_files             = "deny"
shadow_reuse                        = "deny"
shadow_same                         = "deny"
shadow_unrelated                    = "deny"
str_to_string                       = "deny"
string_lit_as_bytes                 = "deny"
try_err                             = "deny"
unneeded_field_pattern              = "deny"
use_self                            = "deny"

# 6. numerical foot-guns
float_arithmetic                    = "deny"
cast_possible_truncation            = "deny"
cast_possible_wrap                  = "deny"
cast_precision_loss                 = "deny"
lossy_float_literal                 = "deny"

# 7. API ergonomics
missing_const_for_fn                = "deny"
must_use_candidate                  = "deny"
unused_async                        = "deny"

# 8. Error handling
missing_panics_doc                  = "deny"
error_impl_error                    = "deny"
result_large_err                    = "deny"

[lints.rust]
missing_docs                        = "deny"

[lints.rustdoc]
missing_crate_level_docs            = "deny"

[dev-dependencies]
assert_cmd = "2.2.2"
insta = "1.47.2"
mockall = "0.14.0"
predicates = "3.1.4"
rstest = "0.26.1"
rstest-bdd = "0.5.0"
rstest-bdd-macros = "0.5.0"
serde_json = "1.0.150"
