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:
asepharyana
2026-07-25 14:58:13 +07:00
parent af202add20
commit c8c84c35fc
2 changed files with 39 additions and 1 deletions
+2 -1
View File
@@ -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