-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
214 lines (171 loc) · 5.5 KB
/
Cargo.toml
File metadata and controls
214 lines (171 loc) · 5.5 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
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
[package]
name = "agent-precommit"
version = "0.1.0"
edition = "2021"
rust-version = "1.82"
authors = ["agent-precommit contributors"]
description = "Smart pre-commit hooks for humans and AI coding agents"
documentation = "https://docs.rs/agent-precommit"
homepage = "https://github.com/agent-precommit/agent-precommit"
repository = "https://github.com/agent-precommit/agent-precommit"
readme = "Readme.md"
license = "MIT"
keywords = ["git", "precommit", "hooks", "ai", "agents"]
categories = ["command-line-utilities", "development-tools"]
[[bin]]
name = "apc"
path = "src/main.rs"
[lib]
name = "agent_precommit"
path = "src/lib.rs"
[dependencies]
# CLI framework
clap = { version = "4.5", features = ["derive", "env", "wrap_help", "string"] }
clap_complete = "4.5"
# Async runtime
tokio = { version = "1.40", features = ["full"] }
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.8"
# Error handling
thiserror = "2.0"
# Note: anyhow was removed - using custom Error type with thiserror instead
# Logging and output
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt", "ansi"] }
# Terminal UI
console = "0.15"
indicatif = { version = "0.17", features = ["tokio"] }
dialoguer = "0.11"
# Process execution
which = "7.0"
# File system operations
walkdir = "2.5"
glob = "0.3"
dirs = "6.0"
# Time
humantime = "2.1"
chrono = { version = "0.4", default-features = false, features = ["clock", "std"] }
# Regex for pattern matching
regex = "1.11"
[dev-dependencies]
# Testing
assert_cmd = "2.0"
predicates = "3.1"
tempfile = "3.14"
rstest = "0.23"
pretty_assertions = "1.4"
insta = { version = "1.41", features = ["yaml", "redactions"] }
mockall = "0.13"
# Fuzzing support
arbitrary = { version = "1.4", features = ["derive"] }
# Benchmarking
criterion = { version = "0.5", features = ["async_tokio"] }
[[bench]]
name = "benchmarks"
harness = false
[features]
default = []
# Enable additional checks during development
dev = []
[profile.release]
lto = true
codegen-units = 1
panic = "abort"
strip = true
opt-level = 3
[profile.dev]
debug = true
opt-level = 0
[profile.dev.package."*"]
opt-level = 2
[profile.bench]
debug = true
# =============================================================================
# Linting Configuration - Extremely Strict
# =============================================================================
[lints.rust]
# Deny unsafe code by default
unsafe_code = "deny"
# Treat all warnings as errors
warnings = "deny"
# Future compatibility
future_incompatible = { level = "deny", priority = -1 }
rust_2018_idioms = { level = "deny", priority = -1 }
rust_2021_compatibility = { level = "deny", priority = -1 }
rust_2024_compatibility = { level = "warn", priority = -1 }
# Documentation
missing_docs = "warn"
missing_debug_implementations = "warn"
# Unsafe patterns
let_underscore_drop = "deny"
non_ascii_idents = "deny"
[lints.clippy]
# =============================================================================
# Clippy Lint Groups - All set to deny/warn for maximum strictness
# =============================================================================
# Correctness - These are almost certainly bugs
correctness = { level = "deny", priority = -1 }
# Suspicious - Code that is most likely wrong or useless
suspicious = { level = "deny", priority = -1 }
# Style - Code that should be written in a more idiomatic way
style = { level = "warn", priority = -1 }
# Complexity - Code that does something simple but in a complex way
complexity = { level = "warn", priority = -1 }
# Performance - Code that can be written to run faster
perf = { level = "warn", priority = -1 }
# Pedantic - Lints which are rather strict or might have false positives
pedantic = { level = "warn", priority = -1 }
# Nursery - New lints that are still under development
nursery = { level = "warn", priority = -1 }
# =============================================================================
# Individual Clippy Lints - Fine-grained control
# =============================================================================
# Deny these in production code; tests may use unwrap/expect
unwrap_used = "warn"
panic = "deny"
todo = "deny"
unimplemented = "deny"
unreachable = "deny"
dbg_macro = "deny"
# Note: print_stdout/print_stderr allowed since this is a CLI tool
print_stdout = "allow"
print_stderr = "allow"
# Error handling
result_large_err = "warn"
# Note: error_impl_error allowed since naming error types `Error` is idiomatic Rust
error_impl_error = "allow"
# Code quality
cognitive_complexity = "warn"
too_many_lines = "warn"
too_many_arguments = "warn"
fn_params_excessive_bools = "warn"
struct_excessive_bools = "warn"
# Documentation - relaxed for early development
missing_errors_doc = "allow"
missing_panics_doc = "allow"
missing_safety_doc = "deny"
# Allow some pedantic lints that are too noisy or stylistic preferences
module_name_repetitions = "allow"
must_use_candidate = "allow"
doc_markdown = "allow"
option_if_let_else = "allow"
single_match_else = "allow"
redundant_closure_for_method_calls = "allow"
unnecessary_wraps = "allow"
unused_self = "allow"
missing_const_for_fn = "allow"
double_must_use = "allow"
uninlined_format_args = "allow"
needless_raw_string_hashes = "allow"
# Test-specific relaxations
disallowed_names = "allow"
default_constructed_unit_structs = "allow"
large_stack_arrays = "allow"
# Allow test assertions
assertions_on_result_states = "allow"
let_underscore_must_use = "allow"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]