forked from nik-rev/patchy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
237 lines (220 loc) · 7.34 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
[package]
name = "patchy-bin"
version = "1.3.0"
edition = "2021"
license = "MIT"
readme = "./docs/README.md"
keywords = ["git", "github", "fork", "patchy"]
categories = ["development-tools", "command-line-utilities"]
authors = ["Nikita Revenco"]
description = "A tool which makes it easy to declaratively manage personal forks by automatically merging pull requests"
repository = "https://github.com/nik-rev/patchy"
homepage = "https://github.com/nik-rev/patchy"
[lints.clippy]
# enable all lints (other than restriction: https://rust-lang.github.io/rust-clippy/master/index.html?groups=restriction#blanket_clippy_restriction_lints), then selectively disable
pedantic = { priority = -1, level = "warn" }
nursery = { priority = -1, level = "warn" }
cargo = { priority = -1, level = "warn" }
# sometimes it can be more readable not to inline format!() args
uninlined_format_args = "allow"
# we don't want to mark everything with #[must_use]
must_use_candidate = "allow"
# if we mark functions with "const", we're limiting what changes
# we can make to the function without breaking the "const" contract
# we may not always want to do that
missing_const_for_fn = "allow"
# we're not a crate: documenting all errors is not necessary
missing_errors_doc = "allow"
# placing an arbitrary limit on how many lines we can have is unnecessary
too_many_lines = "allow"
# it can't detect if the code has a condition to stop the iterator
maybe_infinite_iter = "allow"
# === Restrictions ===
# == safety ==
# Each 'unsafe' block should always contain exactly 1 unsafe operation
# with clear documentation why the invariants are upheld.
undocumented_unsafe_blocks = "deny"
unnecessary_safety_comment = "deny"
unnecessary_safety_doc = "deny"
multiple_unsafe_ops_per_block = "deny"
# not specifying representation may cause undefined behaviour
default_union_representation = "deny"
# == correctness ==
# Program may behave unexpectedly
create_dir = "deny"
filetype_is_file = "deny"
# may cause memory leaks
mem_forget = "deny"
assertions_on_result_states = "deny"
# The conversion might include a dangerous cast that might go undetected due to the type being inferred.
as_pointer_underscore = "deny"
as_underscore = "deny"
# bloats the binary size with unneeded files
doc_include_without_cfg = "deny"
# casting a function to a pointer is likely a mistake
fn_to_numeric_cast_any = "deny"
# integer division discards the remainder and is likely a mistake
integer_division = "deny"
lossy_float_literal = "deny"
wildcard_enum_match_arm = "deny"
# == performance ==
# .to_string() is problematic because it does through the whole Display pipeline
str_to_string = "warn"
non_zero_suggestions = "warn"
mutex_atomic = "warn"
rc_mutex = "warn"
rc_buffer = "warn"
# prefer using pattern matching
string_lit_chars_any = "warn"
missing_asserts_for_indexing = "warn"
pathbuf_init_then_push = "warn"
# == readabilty ==
unseparated_literal_suffix = "warn"
unneeded_field_pattern = "warn"
unnecessary_self_imports = "warn"
try_err = "warn"
map_with_unused_argument_over_ranges = "warn"
# better be explicit with .clone()
string_to_string = "warn"
# no need to be extra verbose, and makes code easier to modify as well
redundant_type_annotations = "warn"
# having multiple layout styles can be confusing
self_named_module_files = "warn"
# having an explicit, even if just containing a comment,
# "else" branch improves readability
else_if_without_else = "warn"
# explicit annotation of ! for functions that never return
# due to having infinite loops
infinite_loop = "warn"
semicolon_outside_block = "warn"
tests_outside_test_module = "warn"
allow_attributes = "warn"
allow_attributes_without_reason = "warn"
needless_raw_strings = "warn"
mixed_read_write_in_expression = "warn"
missing_assert_message = "warn"
get_unwrap = "warn"
if_then_some_else_none = "warn"
impl_trait_in_params = "warn"
map_err_ignore = "warn"
# explicit imports
alloc_instead_of_core = "warn"
std_instead_of_alloc = "warn"
std_instead_of_core = "warn"
# may give the impression that we have more test coverage than what we have in reality
cfg_not_test = "warn"
# Rc::clone($expr) is way better than $expr.clone(), when we see `.clone()`
# we instantly might think "expensive". But cloning a pointer isn't. It's
# good to be explicit
clone_on_ref_ptr = "warn"
decimal_literal_representation = "warn"
empty_enum_variants_with_brackets = "warn"
empty_structs_with_brackets = "warn"
error_impl_error = "warn"
inline_asm_x86_att_syntax = "warn"
multiple_inherent_impl = "warn"
pub_without_shorthand = "warn"
renamed_function_params = "warn"
rest_pat_in_fully_bound_structs = "warn"
# same name from a trait and one not from a trait can be confusing
same_name_method = "warn"
# more explicit and avoids polluting the scope
unused_trait_names = "warn"
absolute_paths = "warn"
deref_by_slicing = "warn"
verbose_file_reads = "warn"
# == enable these before pushing a new release ==
# dbg_macro = "deny"
# todo = "warn"
# unimplemented = "warn"
# use_debug = "warn"
# == not enabled ==
# disallowed_script_idents = "allow"
# big_endian_bytes = "allow"
# default_numeric_fallback = "allow"
# empty_drop = "allow"
# exhaustive_enums = "allow"
# exhaustive_structs = "allow"
# exit = "allow"
# field_scoped_visibility_modifiers = "allow"
# float_arithmetic = "allow"
# float_cmp_const = "allow"
# host_endian_bytes = "allow"
# implicit_return = "allow"
# indexing_slicing = "allow"
# inline_asm_x86_intel_syntax = "allow"
# integer_division_remainder_used = "allow"
# iter_over_hash_type = "allow"
# large_include_file = "allow"
# let_underscore_must_use = "allow"
# let_underscore_untyped = "allow"
# little_endian_bytes = "allow"
# min_ident_chars = "allow"
# missing_docs_in_private_items = "allow"
# missing_inline_in_public_items = "allow"
# missing_trait_methods = "allow"
# mod_module_files = "allow"
# module_name_repetitions = "allow"
# modulo_arithmetic = "allow"
# panic = "allow"
# non_ascii_literal = "allow"
# panic_in_result_fn = "allow"
# partial_pub_fields = "allow"
# print_stderr = "allow"
# print_stdout = "allow"
# expect_used = "allow"
# pub_use = "allow"
# # we prefer using the shorthand
# pub_with_shorthand = "allow"
# question_mark_used = "allow"
# ref_patterns = "allow"
# # we prefer outside of the block instead
# semicolon_inside_block = "allow"
# shadow_reuse = "allow"
# shadow_same = "allow"
# # We like to separate literal suffixes by an underscore
# separated_literal_suffix = "allow"
# single_char_lifetime_names = "allow"
# single_call_fn = "allow"
# string_add = "allow"
# string_slice = "allow"
# unreachable = "allow"
# suspicious_xor_used_as_pow = "allow"
# unused_result_ok = "allow"
# unwrap_in_result = "allow"
# unwrap_used = "allow"
# shadow_unrelated = "allow"
# pattern_type_mismatch = "allow"
[[bin]]
name = "patchy"
path = "src/main.rs"
[lib]
name = "patchy"
[package.metadata.wix]
upgrade-guid = "5868B076-2779-431F-9B51-0B12B052711C"
path-guid = "17921C69-1BA1-422E-BCFC-0F5C960BEDF0"
license = false
eula = false
[dependencies]
anyhow = "1.0"
serde = { version = "1.0", features = ["derive"] }
toml = "0.8"
tokio = { version = "1.42", features = ["full"] }
reqwest = { version = "0.12", default-features = false, features = [
"blocking",
"json",
"rustls-tls",
] }
serde_json = "1.0"
tempfile = "3.14"
rand = "0.8"
colored = "2.2"
dialoguer = "0.11"
futures = "0.3"
indexmap = "2.7"
once_cell = "1.17"
# The profile that 'dist' will build with
[profile.dist]
inherits = "release"
codegen-units = 1
lto = "fat"