feat: add principle #28 — Never Suppress Lints, Fix the Code
- New engineering-principle: never #[allow], @ts-ignore, # noqa — fix instead - Rust skill: add explicit #[allow(clippy::...)] anti-pattern with examples - Also covers eslint-disable, ts-ignore, noqa, go vet - Single exceptions: false positives, generated code, phased migration (<30d) - CI enforcement commands for Rust/TS/Python/Go
This commit is contained in:
1 parent
af202add20
commit
c8c84c35fc
2 files changed
+39
-1
No files matched your search
@@ -194,5 +194,6 @@ pub struct UserResponse {
|
||||
- ❌ `unsafe` without documented safety invariants
|
||||
- ❌ `Rc<RefCell<...>>` in async contexts — use `Arc<Mutex<...>>`
|
||||
- ❌ `Box<dyn Trait>` where generics work — `impl Trait` or generic param
|
||||
- ❌ Ignoring clippy warnings — run `clippy` before every commit
|
||||
- ❌ `#[allow(clippy::...)]` — never suppress warnings; fix the code instead. `too_many_arguments` means extract a struct. `type_complexity` means extract a type alias or refactor.
|
||||
- ❌ Ignoring clippy warnings — run `clippy` before every commit. `cargo clippy -- -D warnings` in CI.
|
||||
- ❌ `#[tokio::main]` on library code — only in binary entry points
|
||||
Reference in new issue
Block a user