This repository has been archived by the owner on Jun 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
73 lines (67 loc) · 2.5 KB
/
Cargo.toml
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
[package]
name = "tsserver-client"
version = "0.1.0"
edition = "2021"
license = "MIT"
repository = "https://github.com/valeneiko/typecheck-server"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lints.rust]
[lints.clippy]
all = { level = "warn" }
# restriction
dbg_macro = "warn"
todo = "warn"
unimplemented = "warn"
# I like the explicitness of this rule as it removes confusion around `clone`.
# This increases readability, avoids `clone` mindlessly and heap allocating on accident.
clone_on_ref_ptr = "warn"
# These two are mutually exclusive, I like `mod.rs` files for better fuzzy searches on module entries.
self_named_module_files = "warn" # "-Wclippy::mod_module_files"
empty_drop = "warn"
empty_structs_with_brackets = "warn"
exit = "warn"
filetype_is_file = "warn"
get_unwrap = "warn"
impl_trait_in_params = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
rest_pat_in_fully_bound_structs = "warn"
unnecessary_safety_comment = "warn"
undocumented_unsafe_blocks = "warn"
# I want to write the best Rust code so both pedantic and nursery is enabled.
# We should only disable rules globally if they are either false positives, chaotic, or does not make sense.
nursery = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
# Allowed rules
# pedantic
# This rule is too pedantic, I don't want to force this because naming things are hard.
module_name_repetitions = "allow"
# All triggers are mostly ignored in our codebase, so this is ignored globally.
struct_excessive_bools = "allow"
too_many_lines = "allow"
# #[must_use] is creating too much noise for this codebase, it does not add much value except nagging
# the programmer to add a #[must_use] after clippy has been run.
# Having #[must_use] every where also hinders readability.
must_use_candidate = "allow"
# used_underscore_binding= "allow"
doc_markdown = "allow"
# nursery
# `const` functions do not make sense for our project because this is not a `const` library.
# This rule also confuses new comers and forces them to add `const` blindlessly without any reason.
missing_const_for_fn = "allow"
[dependencies]
serde = { version = "1.0.196", features = ["derive"] }
serde_json = { version = "1.0.113" }
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
strip = "symbols"
debug = false
panic = "abort"
# Use the `--profile release-debug` flag to show symbols in release mode.
# e.g. `cargo build --profile release-debug`
[profile.release-debug]
inherits = "release"
strip = false
debug = true