[package]
authors = ["Willem Vanhulle <willemvanhulle@protonmail.com>"]
description = "Linter for Nu shell scripts that helpfully suggests improvements"
edition = "2024"
exclude = [
    "result",
    ".helix/",
    ".vscode/",
    ".github/",
    "Cargo.lock",
    "benches/",
]
keywords = ["nushell", "linter", "static-analysis", "code-quality", "shell"]
license = "MIT"
name = "nu-lint"
repository = "https://codeberg.org/wvhulle/nu-lint"
version = "0.0.78"


[lints.clippy]
# https://rust-lang.github.io/rust-clippy/master/index.html
complexity = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
style = { level = "warn", priority = -1 }

absolute_paths = "warn"
allow_attributes_without_reason = "deny"
branches_sharing_code = "deny"
collapsible_else_if = "deny"
collapsible_if = "deny"
explicit_counter_loop = "deny"
explicit_iter_loop = "deny"
filter_map_next = "deny"
flat_map_identity = "deny"
get_unwrap = "deny"
if_then_some_else_none = "deny"
impl_trait_in_params = "allow"
manual_clamp = "deny"
manual_filter_map = "deny"
manual_find = "deny"
manual_map = "deny"
manual_ok_or = "deny"
missing_panics_doc = "allow"
needless_raw_string_hashes = "allow"
struct_excessive_bools = "allow"
# manual_saturating_arithmetic = "deny"
manual_unwrap_or = "deny"
manual_while_let_some = "deny"
map_err_ignore = "deny"
map_flatten = "deny"
map_unwrap_or = "deny"
match_bool = "deny"
missing_assert_message = "deny"
missing_const_for_fn = "deny"
# mod_module_files = "deny"
# module_name_repetitions = "deny"
multiple_inherent_impl = "deny"
mut_mut = "deny"
# mutex_atomic = "deny"
needless_bool = "deny"
needless_bool_assign = "deny"
needless_collect = "deny"
needless_continue = "deny"
needless_range_loop = "deny"
option_if_let_else = "deny"
option_map_or_none = "deny"
panic_in_result_fn = "deny"
redundant_clone = "deny"
redundant_closure_for_method_calls = "deny"
redundant_pub_crate = "deny"
redundant_type_annotations = "deny"
renamed_function_params = "deny"
significant_drop_tightening = "deny"
single_match_else = "deny"
single_option_map = "deny"
too_long_first_doc_paragraph = "deny"
trait_duplication_in_bounds = "deny"
trivial_regex = "deny"
type_repetition_in_bounds = "deny"
unnecessary_lazy_evaluations = "deny"
unnecessary_mut_passed = "deny"
use_self = "deny"
useless_let_if_seq = "deny"
verbose_file_reads = "deny"

[dependencies]
clap = { version = "4.5", features = ["derive"] }
env_logger = "0.11"
heck = "0.5"
ignore = "0.4"
jaq-core = "2.2"
log = "0.4"
lsp-server = "0.7"
lsp-types = "0.97"
miette = { version = "7.6", features = ["fancy"] }
nu-cli = "0.109.1"
nu-cmd-lang = "0.109.1"
nu-command = { version = "0.109.1", features = ["sqlite"] }
nu-parser = "0.109.1"
nu-protocol = "0.109.1"
nu-std = "0.109.1"
rayon = "1.10"
regex = "1.10"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
similar = "2.6"
toml = "0.8"

[dev-dependencies]
criterion = { version = "0.7", features = ["html_reports", "csv_output"] }
tempfile = "3.10"

[build-dependencies]
toml = "0.8"

[[bench]]
harness = false
name = "lint_performance"
