-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCargo.toml
More file actions
84 lines (81 loc) · 3.62 KB
/
Copy pathCargo.toml
File metadata and controls
84 lines (81 loc) · 3.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
[workspace]
members = ["src/sharplsp"]
default-members = ["src/sharplsp"]
resolver = "2"
[workspace.lints.clippy]
# all + pedantic at maximum — restriction & nursery cherry-picked (contain contradictions)
all = { level = "deny", priority = -1 }
pedantic = { level = "deny", priority = -1 }
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"
todo = "deny"
unimplemented = "deny"
unreachable = "deny"
missing_docs_in_private_items = "deny"
# Implicit panics from out-of-bounds indexing — use .get() instead
indexing_slicing = "deny"
# Silent lossy type conversions via `as` — use .into()/.try_into() instead
as_conversions = "deny"
# Forgotten debug macros leaking info to stderr
dbg_macro = "deny"
# No raw stdout writes — an LSP server speaks JSON-RPC over stdio, so a stray
# `print!`/`println!` corrupts the protocol frame. Diagnostics MUST go through
# `tracing` (CLAUDE.md logging principle #1). This macro-only lint does not touch
# the framed writes lsp-server makes via io::stdout(), so protocol output is fine.
# NOTE: `print_stderr` is deliberately NOT denied — stderr is a separate stream
# inherited into the editor's log panel, and it is the correct last-resort sink
# for the pre-tracing bootstrap error in main.rs (before the subscriber exists)
# and for skip/status diagnostics in integration tests.
print_stdout = "deny"
# Resource leaks from skipped destructors — use ManuallyDrop if needed
mem_forget = "deny"
# From impls that can panic should be TryFrom instead
fallible_impl_from = "deny"
# Catch needless implicit clones — use .clone() for explicit intent
implicit_clone = "deny"
# Require SAFETY comments on any unsafe block — defense in depth for allowed exceptions
undocumented_unsafe_blocks = "deny"
# Prevent silent precision loss in float literals — critical for numeric type correctness
lossy_float_literal = "deny"
# Prevent stack overflow from oversized local variables — critical for recursive AST walking
large_stack_frames = "deny"
# Force #[expect] over #[allow] so stale lint suppressions don't hide new violations
allow_attributes = "deny"
too_many_lines = "deny"
too_many_arguments = "deny"
cast_possible_truncation = "deny"
# Catch accidental infinite loops — require `-> !` return type for intentional ones
infinite_loop = "deny"
# Prevent silent error cause discarding in .map_err(|_| ...) — preserve error provenance
map_err_ignore = "deny"
# Prevent process::exit() — use proper error propagation, exit only via main() return
exit = "deny"
# Catch struct destructures that silently ignore new fields — critical during refactoring
rest_pat_in_fully_bound_structs = "deny"
# Require Arc::clone(&x) syntax — make ref-counted pointer cloning visually distinct
clone_on_ref_ptr = "deny"
[workspace.lints.rust]
unsafe_code = "deny"
missing_docs = "deny"
missing_debug_implementations = "deny"
unused_imports = "deny"
dead_code = "deny"
unused_variables = "deny"
unused_mut = "deny"
unused_assignments = "deny"
unused_results = "deny"
trivial_casts = "deny"
trivial_numeric_casts = "deny"
elided_lifetimes_in_paths = "deny"
future_incompatible = { level = "deny", priority = -1 }
nonstandard_style = { level = "deny", priority = -1 }
rust_2018_idioms = { level = "deny", priority = -1 }
[workspace.package]
version = "0.1.0"
edition = "2021"
description = "SharpLsp: The .NET Language Server Platform"
license = "MIT"
homepage = "https://github.com/Nimblesite/SharpLsp"
repository = "https://github.com/Nimblesite/SharpLsp"
readme = "README.md"