-
Notifications
You must be signed in to change notification settings - Fork 8
/
Cargo.toml
169 lines (159 loc) · 4.93 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
[package]
name = "srgn"
version = "0.13.4"
edition = "2021"
authors = ["Alex Povel <rust@alexpovel.de>"]
description = "A grep-like tool which understands source code syntax and allows for manipulation in addition to search"
license = "MIT OR Apache-2.0"
repository = "https://github.com/alexpovel/srgn"
readme = "README.md"
documentation = "https://docs.rs/srgn"
keywords = ["grep", "grammars", "languages", "search", "manipulation"]
categories = [
"command-line-utilities",
"development-tools",
"localization",
"text-editors",
"text-processing",
]
rust-version = "1.80.0"
exclude = [
# Contains large submodules; those should *not* be checked out when packaging for
# crates.io, aka not end up being a problem, but protect against accidents
"benches/",
]
[dependencies]
anyhow = { version = "1.0.92", features = ["backtrace"] }
cached = { version = "0.53.1", optional = true, default-features = false, features = [
"ahash",
"proc_macro",
] }
clap = { version = "4.5.13", features = [
"derive",
"env",
"string",
"wrap_help",
] }
clap_complete = "4.5.13"
colored = "2.1.0"
const_format = "0.2.33"
decompound = { version = "0.3.0", optional = true }
env_logger = { version = "0.11.5", default-features = false, features = [
"auto-color",
"humantime",
] }
fancy-regex = "0.14.0"
fst = { version = "0.4.7", optional = true }
glob = "0.3.1"
grep-cli = "0.1.11"
ignore = "0.4.23"
itertools = "0.13.0"
log = "0.4.22"
pathdiff = "0.2.1"
tempfile = "3.13.0"
titlecase = "3.3.0"
tree-sitter = "0.23.0"
tree-sitter-c = "0.23.1"
tree-sitter-c-sharp = "0.23.0"
tree-sitter-go = "0.23.1"
tree-sitter-python = "0.23.2"
tree-sitter-rust = "0.23.0"
tree-sitter-typescript = "0.23.0"
unescape = "0.1.0"
unicode-normalization = "0.1.24"
unicode_categories = "0.1.1"
unicode_titlecase = "2.4.0"
[features]
all = ["german", "symbols"]
default = ["all"]
german = ["cached", "decompound", "fst"]
symbols = []
[dev-dependencies]
assert_cmd = "2.0.16"
comrak = { version = "0.28.0", default-features = false }
enum-iterator = "2.1.0"
insta = { version = "1.41.1", features = ["yaml"] }
nom = "7.1.3"
predicates = { version = "3.1.2", default-features = false }
pretty_assertions = "1.4.1"
proptest = "1.5.0"
rand = "0.8.5"
rand_regex = "0.17.0"
rstest = { version = "0.23.0", default-features = false }
serde = { version = "1.0.214", features = ["derive"], default-features = false }
[lints.clippy]
pedantic = "warn"
cargo = "warn"
style = "warn"
perf = "warn"
complexity = "warn"
correctness = "warn"
nursery = "warn"
suspicious = "warn"
# Overrides
multiple_crate_versions = { level = "allow", priority = 1 }
module_name_repetitions = { level = "allow", priority = 1 }
[lints.rust]
# Just took everything at
# https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html
# and made it more strict. Will perhaps get too annoying.
absolute_paths_not_starting_with_crate = "warn"
deprecated_safe = { level = "warn", priority = -1 }
elided_lifetimes_in_paths = "warn"
explicit_outlives_requirements = "warn"
ffi_unwind_calls = "warn"
# fuzzy_provenance_casts = "warn" # Unstable
# impl_trait_overcaptures = "warn" # Unstable
keyword-idents = "warn"
keyword_idents_2018 = "warn"
keyword_idents_2024 = "warn"
let_underscore_drop = "warn"
# lossy_provenance_casts = "warn" # Unstable
macro_use_extern_crate = "warn"
meta_variable_misuse = "warn"
missing_abi = "warn"
missing_copy_implementations = "warn"
missing_debug_implementations = "warn"
missing_docs = "warn"
missing_unsafe_on_extern = "allow" # Switch back on once things are Rust 1.82+ everywhere
# multiple_supertrait_upcastable = "warn" # Unstable
# must_not_suspend = "warn" # Unstable
non_ascii_idents = "warn"
# non_exhaustive_omitted_patterns = "warn" # Unstable
non_local_definitions = "warn"
redundant_lifetimes = "warn"
rust_2021_incompatible_closure_captures = "warn"
rust_2021_incompatible_or_patterns = "warn"
rust_2021_prefixes_incompatible_syntax = "warn"
rust_2021_prelude_collisions = "warn"
# rust_2024_incompatible_pat = "warn" # Unstable
single_use_lifetimes = "warn"
trivial_casts = "warn"
trivial_numeric_casts = "warn"
unit_bindings = "warn"
unnameable_types = "warn"
unreachable_pub = "allow" # Too noisy
unsafe_code = "warn"
unsafe_op_in_unsafe_fn = "warn"
unstable_features = "warn"
unused_crate_dependencies = "allow"
unused_extern_crates = "allow"
unused_import_braces = "warn"
unused_lifetimes = "warn"
unused_macro_rules = "warn"
unused_qualifications = "warn"
unused_results = "allow" # Too noisy
variant_size_differences = "warn"
[profile.dev.package.insta]
# https://insta.rs/docs/quickstart/#optional-faster-runs
opt-level = 3
[profile.dev.package.similar]
# https://insta.rs/docs/quickstart/#optional-faster-runs
opt-level = 3
[build-dependencies]
cc = { version = "1.1.31", features = ["parallel"] }
decompound = "0.3.0"
fst = "0.4.7"
rayon = "1.10.0"
[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/{ name }-v{ version }/{ name }-{ target }{ archive-suffix }"