@pilllesss/yorn 1.0.182 → 1.0.183

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of @pilllesss/yorn might be problematic. Click here for more details.

Files changed (45) hide show
  1. package/README.md +1 -1
  2. package/dist/providers/data/.manifest.json +1 -1
  3. package/dist/skills/code-review/LICENSE +21 -0
  4. package/dist/skills/code-review/SKILL.md +233 -0
  5. package/dist/skills/code-review/assets/pr-review-template.md +137 -0
  6. package/dist/skills/code-review/assets/review-checklist.md +123 -0
  7. package/dist/skills/code-review/reference/angular.md +768 -0
  8. package/dist/skills/code-review/reference/architecture-review-guide.md +472 -0
  9. package/dist/skills/code-review/reference/c.md +890 -0
  10. package/dist/skills/code-review/reference/code-quality-universal.md +488 -0
  11. package/dist/skills/code-review/reference/code-review-best-practices.md +136 -0
  12. package/dist/skills/code-review/reference/common-bugs-checklist.md +302 -0
  13. package/dist/skills/code-review/reference/cpp.md +893 -0
  14. package/dist/skills/code-review/reference/cross-cutting/async-concurrency-patterns.md +515 -0
  15. package/dist/skills/code-review/reference/cross-cutting/error-handling-principles.md +492 -0
  16. package/dist/skills/code-review/reference/cross-cutting/n-plus-one-queries.md +309 -0
  17. package/dist/skills/code-review/reference/cross-cutting/sql-injection-prevention.md +308 -0
  18. package/dist/skills/code-review/reference/cross-cutting/xss-prevention.md +264 -0
  19. package/dist/skills/code-review/reference/csharp.md +525 -0
  20. package/dist/skills/code-review/reference/css-less-sass.md +661 -0
  21. package/dist/skills/code-review/reference/dart.md +670 -0
  22. package/dist/skills/code-review/reference/django.md +985 -0
  23. package/dist/skills/code-review/reference/fastapi.md +580 -0
  24. package/dist/skills/code-review/reference/go.md +993 -0
  25. package/dist/skills/code-review/reference/java.md +409 -0
  26. package/dist/skills/code-review/reference/java8.md +586 -0
  27. package/dist/skills/code-review/reference/kotlin.md +1018 -0
  28. package/dist/skills/code-review/reference/nestjs.md +593 -0
  29. package/dist/skills/code-review/reference/performance-review-guide.md +816 -0
  30. package/dist/skills/code-review/reference/php.md +684 -0
  31. package/dist/skills/code-review/reference/python.md +1073 -0
  32. package/dist/skills/code-review/reference/qt.md +757 -0
  33. package/dist/skills/code-review/reference/react.md +871 -0
  34. package/dist/skills/code-review/reference/ruby.md +964 -0
  35. package/dist/skills/code-review/reference/rust.md +846 -0
  36. package/dist/skills/code-review/reference/security-review-guide.md +494 -0
  37. package/dist/skills/code-review/reference/svelte.md +1064 -0
  38. package/dist/skills/code-review/reference/swift.md +936 -0
  39. package/dist/skills/code-review/reference/typescript.md +1016 -0
  40. package/dist/skills/code-review/reference/vue.md +924 -0
  41. package/dist/skills/code-review/reference/zig.md +440 -0
  42. package/dist/skills/code-review/scripts/pr-analyzer.py +435 -0
  43. package/dist/skills/code-review/scripts/test_pr_analyzer.py +380 -0
  44. package/dist/yorn.cjs +628 -628
  45. package/package.json +2 -2
@@ -0,0 +1,302 @@
1
+ # Common Bugs Checklist
2
+
3
+ Quick-reference bug patterns organized by category. For detailed code examples, explanations, and comprehensive review checklists, see the dedicated language guides linked below.
4
+
5
+ ## Universal Issues
6
+
7
+ ### Logic Errors
8
+ - [ ] Off-by-one errors in loops and array access
9
+ - [ ] Incorrect boolean logic (De Morgan's law violations)
10
+ - [ ] Missing null/undefined checks
11
+ - [ ] Race conditions in concurrent code
12
+ - [ ] Incorrect comparison operators (`==` vs `===`, `=` vs `==`)
13
+ - [ ] Integer overflow/underflow
14
+ - [ ] Floating point comparison issues
15
+
16
+ ### Resource Management
17
+ - [ ] Memory leaks (unclosed connections, listeners)
18
+ - [ ] File handles not closed
19
+ - [ ] Database connections not released
20
+ - [ ] Event listeners not removed
21
+ - [ ] Timers/intervals not cleared
22
+
23
+ ### Error Handling
24
+ - [ ] Swallowed exceptions (empty catch blocks)
25
+ - [ ] Generic exception handling hiding specific errors
26
+ - [ ] Missing error propagation
27
+ - [ ] Incorrect error types thrown
28
+ - [ ] Missing finally/cleanup blocks
29
+
30
+ ## TypeScript/JavaScript
31
+
32
+ - [ ] `==` instead of `===`
33
+ - [ ] Using `any` — prefer proper types or `unknown` with type guards
34
+ - [ ] Missing `await` on async calls
35
+ - [ ] Unhandled promise rejections (no try-catch around await)
36
+ - [ ] `this` context lost in callbacks
37
+ - [ ] Missing `key` prop in lists
38
+ - [ ] Closure capturing stale loop variable
39
+ - [ ] `parseInt` without radix parameter
40
+ - [ ] Modifying array/object during iteration
41
+
42
+ **Full guide:** [TypeScript Review Guide](typescript.md)
43
+
44
+ ## React / React 19
45
+
46
+ - [ ] Hooks called conditionally or in loops (violates Rules of Hooks)
47
+ - [ ] `useEffect` dependency array incomplete or incorrect
48
+ - [ ] `useEffect` missing cleanup function (subscriptions, timers, fetches)
49
+ - [ ] `useEffect` used for derived state (use `useMemo` instead)
50
+ - [ ] `useMemo`/`useCallback` over-used or used without `React.memo`
51
+ - [ ] Component defined inside another component (re-mounts every render)
52
+ - [ ] Unstable props (inline objects/functions passed to memo components)
53
+ - [ ] Direct mutation of props
54
+ - [ ] List missing `key` or using array index as key (reorderable lists)
55
+ - [ ] Server Component using client APIs (`useState`, `useEffect`, `onClick`)
56
+ - [ ] `'use client'` on parent making entire subtree client-side
57
+ - [ ] `useActionState` calling `setState` instead of returning new state
58
+ - [ ] `useFormStatus` called in same component as `<form>` (must be in child)
59
+ - [ ] `useOptimistic` used for critical operations (payments, deletions)
60
+ - [ ] Single Suspense boundary for entire page (slow blocks fast)
61
+ - [ ] Missing Error Boundary wrapping Suspense
62
+ - [ ] `use()` Hook receiving a new Promise each render
63
+
64
+ **TanStack Query v5:**
65
+ - [ ] `queryKey` missing parameters that affect data
66
+ - [ ] Default `staleTime: 0` causing excessive refetches
67
+ - [ ] `useSuspenseQuery` with `enabled` option (not supported)
68
+ - [ ] Mutation not invalidating related queries on success
69
+ - [ ] Optimistic update missing rollback in `onError`
70
+ - [ ] Using v4 array syntax (`useQuery(['key'], fn)`) instead of v5 object syntax
71
+
72
+ **Testing:**
73
+ - [ ] Using `container.querySelector` instead of `screen.getByRole`
74
+ - [ ] Using `fireEvent` instead of `userEvent`
75
+ - [ ] Testing implementation details instead of user-visible behavior
76
+ - [ ] Using `getBy*` for async content (use `findBy*`)
77
+
78
+ **Full guide:** [React Review Guide](react.md)
79
+
80
+ ## Vue 3
81
+
82
+ - [ ] Destructuring `reactive()` object loses reactivity (use `toRefs`)
83
+ - [ ] Passing `props.x` to composable instead of `() => props.x` or `toRef(props, 'x')`
84
+ - [ ] `watch` with async callback missing `onCleanup` (race condition)
85
+ - [ ] `computed` with side effects (mutations, API calls)
86
+ - [ ] `v-for` using index as `:key` when list can reorder
87
+ - [ ] `v-if` and `v-for` on the same element
88
+ - [ ] `defineProps` without TypeScript type declaration
89
+ - [ ] `withDefaults` object default values not using factory functions
90
+ - [ ] Directly mutating props instead of emitting events
91
+ - [ ] `watchEffect` with unclear dependencies causing over-triggering
92
+
93
+ **Full guide:** [Vue 3 Review Guide](vue.md)
94
+
95
+ ## Python
96
+
97
+ - [ ] Mutable default arguments (`def f(x=[])`)
98
+ - [ ] Bare `except:` catching `KeyboardInterrupt` and `SystemExit`
99
+ - [ ] Shared mutable class attributes (`class C: items = []`)
100
+ - [ ] Using `is` instead of `==` for value comparison
101
+ - [ ] Forgetting `self` parameter in methods
102
+ - [ ] Modifying list while iterating
103
+ - [ ] String concatenation in loops (use `"".join()`)
104
+ - [ ] Not closing files (use `with` statement)
105
+ - [ ] Missing type annotations on public functions
106
+
107
+ **Full guide:** [Python Review Guide](python.md)
108
+
109
+ ## Rust
110
+
111
+ **Ownership & Borrowing:**
112
+ - [ ] Unnecessary `clone()` to work around borrow checker
113
+ - [ ] `Arc<Mutex<T>>` when single-owner would suffice
114
+ - [ ] Storing borrows in structs when owned data is simpler
115
+ - [ ] Unnecessary `RefCell` (runtime checks vs compile-time)
116
+
117
+ **Unsafe Code:**
118
+ - [ ] `unsafe` block without `SAFETY:` comment explaining invariants
119
+ - [ ] `unsafe fn` without `# Safety` doc section
120
+ - [ ] Unsafe invariants split across modules
121
+
122
+ **Async & Concurrency:**
123
+ - [ ] Blocking in async context (`std::fs`, `std::thread::sleep`)
124
+ - [ ] Holding `std::sync::Mutex` across `.await`
125
+ - [ ] Spawned task missing `'static` lifetime bound
126
+ - [ ] Dropping a Future without awaiting (forgotten work)
127
+
128
+ **Error Handling:**
129
+ - [ ] `unwrap()`/`expect()` in production code
130
+ - [ ] Library using `anyhow` instead of `thiserror` (callers can't match)
131
+ - [ ] Swallowing error context (`map_err(|_| ...)`)
132
+ - [ ] Ignoring `must_use` return values
133
+
134
+ **Performance:**
135
+ - [ ] Unnecessary `.collect()` — prefer lazy iterators
136
+ - [ ] String concatenation in loops without `with_capacity`
137
+ - [ ] `Box<dyn Trait>` when `impl Trait` would work
138
+
139
+ **Full guide:** [Rust Review Guide](rust.md)
140
+
141
+ ## Go
142
+
143
+ - [ ] Ignoring errors (`result, _ := SomeFunction()`)
144
+ - [ ] Goroutine with no exit mechanism (leak)
145
+ - [ ] Missing or incorrect `context.Context` propagation
146
+ - [ ] Loop variable capture issue (Go < 1.22)
147
+ - [ ] `defer` in loops (deferred until function, not loop iteration)
148
+ - [ ] Variable shadowing
149
+ - [ ] Map used before initialization
150
+ - [ ] Error wrapping with `%v` instead of `%w` (breaks `errors.Is`/`errors.As`)
151
+
152
+ **Full guide:** [Go Review Guide](go.md)
153
+
154
+ ## Java / Spring Boot
155
+
156
+ - [ ] POJO/DTO with manual boilerplate instead of `record` *(Java 17+)*
157
+ - [ ] Traditional switch missing `break` (use switch expressions) *(Java 14+)*
158
+ - [ ] Field injection instead of constructor injection
159
+ - [ ] JPA N+1 query (missing `fetch join` or `@EntityGraph`)
160
+ - [ ] Incorrect `equals`/`hashCode` on JPA entities (avoid `@Data`; prefer stable business key or null-safe id — never all lazy fields)
161
+ - [ ] `Optional.get()` without `isPresent()` check
162
+ - [ ] Stream operations with side effects
163
+
164
+ **Full guide:** [Java Review Guide](java.md) (17/21 + Boot 3)
165
+
166
+ ## Java 8 / Spring Boot 2 (Legacy)
167
+
168
+ - [ ] Shared `SimpleDateFormat` / legacy `Date` instead of `java.time`
169
+ - [ ] `Collectors.toMap` with null values or missing merge function
170
+ - [ ] `Optional` used as field/parameter, or `isPresent()`+`get()` as null-check
171
+ - [ ] `CompletableFuture.supplyAsync` I/O on `commonPool` (no explicit executor)
172
+ - [ ] `RestTemplate` without connect/read timeouts
173
+ - [ ] `@Transactional` on private method or same-class self-invocation
174
+ - [ ] `parallelStream` with shared mutable state
175
+ - [ ] Mixing `javax.*` and `jakarta.*` on Boot 2
176
+
177
+ **Full guide:** [Java 8 Review Guide](java8.md)
178
+
179
+ ## PHP
180
+
181
+ - [ ] Missing `declare(strict_types=1);` in new files
182
+ - [ ] Weak comparison (`==`, `!=`) in auth, token, payment, or state logic
183
+ - [ ] `in_array()` / `array_search()` used without strict mode
184
+ - [ ] SQL built with string concatenation instead of prepared statements
185
+ - [ ] User input echoed without context-aware escaping
186
+ - [ ] Passwords stored with `md5()` / `sha1()` instead of `password_hash()`
187
+ - [ ] Untrusted data passed to `unserialize()`
188
+ - [ ] PHP 8.2+ dynamic properties used instead of declared properties
189
+ - [ ] Errors hidden with `@` or swallowed in empty `catch` blocks
190
+ - [ ] File uploads using client-provided names or missing MIME/size validation
191
+
192
+ **Full guide:** [PHP Review Guide](php.md)
193
+
194
+ ## Ruby / Rails
195
+
196
+ - [ ] Condition assumes `0`, `""`, or `[]` is falsey
197
+ - [ ] Mutable Hash/Array default shared across entries (`Hash.new([])`, `Array.new(3, [])`)
198
+ - [ ] Bang method return value treated as the transformed object
199
+ - [ ] Bare or broad `rescue` hides unrelated failures or exposes `error.message`
200
+ - [ ] Dynamic `send`, `constantize`, `eval`, or SQL fragment controlled by user input
201
+ - [ ] Untrusted data passed to `Marshal.load`, unsafe YAML loading, or an interpolated shell command
202
+ - [ ] Strong parameters use `permit!`, `to_unsafe_h`, or an empty hash allowlist
203
+ - [ ] Nested `params.expect` arrays use a flat shape instead of the required `[[...]]` form
204
+ - [ ] Active Record query interpolates values or dynamic identifiers into SQL
205
+ - [ ] `Model.find(params[:id])` loads a record before ownership or policy scoping (IDOR)
206
+ - [ ] `redirect_to` accepts a user-controlled URL with `allow_other_host: true` (open redirect)
207
+ - [ ] Browser-authenticated state changes skip CSRF protection or use unsafe session cookie flags
208
+ - [ ] Association access in a loop causes N+1 queries
209
+ - [ ] Model validation lacks a matching database constraint for a critical invariant
210
+ - [ ] `update_all` / `delete_all` unexpectedly skips callbacks and validations
211
+ - [ ] Bulk writes can drift a `counter_cache` without reconciliation
212
+ - [ ] Active Job retry can duplicate a payment, email, or other external side effect
213
+ - [ ] GlobalID job argument can be deleted before deserialization
214
+ - [ ] Transaction contains external side effects that cannot roll back
215
+ - [ ] Retried create/payment request can duplicate committed work without an idempotency key
216
+
217
+ **Full guide:** [Ruby and Rails Review Guide](ruby.md)
218
+
219
+ ## Swift
220
+
221
+ - [ ] Force-unwrap (`!`) or `try!` where safe unwrapping is possible
222
+ - [ ] Closure capturing `self` strongly without `[weak self]` (retain cycle)
223
+ - [ ] Reference type (`class`) used where a value type (`struct`) is intended
224
+ - [ ] Errors swallowed instead of propagated via `throws` / `Result`
225
+ - [ ] Data race across concurrency boundaries (missing `Sendable`, `@MainActor`, actor isolation)
226
+ - [ ] Fire-and-forget `Task {}` that is never cancelled or leaks
227
+ - [ ] `@ObservedObject` used where `@StateObject` is required for ownership
228
+ - [ ] Implicitly unwrapped optional (`var x: T!`) outside IBOutlets
229
+ - [ ] Over-broad access control (`public` / `open` where `internal` suffices)
230
+
231
+ **Full guide:** [Swift Review Guide](swift.md)
232
+
233
+ ## Dart / Flutter
234
+
235
+ - [ ] Missing `const` on static widget subtrees, or `_buildFoo()` helpers instead of extracted widgets
236
+ - [ ] `!` / `as` / unconstrained `late` used to silence null safety
237
+ - [ ] Heavy `jsonDecode` / image / crypto work on the UI isolate
238
+ - [ ] `Future` or `Stream` created inside `build` (new instance every rebuild)
239
+ - [ ] `setState` / `BuildContext` used after `await` without `mounted` / `context.mounted`
240
+ - [ ] `ref.watch` / `context.watch` in a callback; `read` used in `build` (or the reverse)
241
+ - [ ] `BlocProvider.value` / `ChangeNotifierProvider.value` given a new instance constructed in `build` (use `create`; `value` does not dispose)
242
+ - [ ] `BlocProvider(create: ...)` captures a stale `id` — missing `ValueKey(id)` remount or `didUpdateWidget` reload (`UniqueKey()` remounts every rebuild)
243
+ - [ ] Platform channel `invokeMethod` without `PlatformException` handling
244
+ - [ ] List children holding `State` missing a stable `ValueKey` (or using `UniqueKey()` in `build`)
245
+ - [ ] `TextEditingController` / `AnimationController` / `StreamSubscription` not disposed
246
+
247
+ **Full guide:** [Dart / Flutter Review Guide](dart.md)
248
+
249
+ ## C
250
+
251
+ - [ ] Pointer/buffer overflow or underflow
252
+ - [ ] Undefined behavior (use-after-free, double-free, null deref)
253
+ - [ ] Missing error handling after allocation (`malloc` can return `NULL`)
254
+ - [ ] Integer overflow in size calculations
255
+ - [ ] Resource leaks (missing `free`, `fclose`, etc.)
256
+ - [ ] Missing `static` on file-local functions/variables
257
+
258
+ **Full guide:** [C Review Guide](c.md)
259
+
260
+ ## C++
261
+
262
+ - [ ] Missing RAII wrapper for resources
263
+ - [ ] Violating Rule of 0/3/5 (destructor, copy, move)
264
+ - [ ] Exception safety issues (no `noexcept` where applicable)
265
+ - [ ] Dangling references from returned iterators or references
266
+ - [ ] Unnecessary copies (missing `std::move` or pass-by-reference)
267
+
268
+ **Full guide:** [C++ Review Guide](cpp.md)
269
+
270
+ ## SQL
271
+
272
+ - [ ] String concatenation for queries (SQL injection risk) — use parameterized queries
273
+ - [ ] Missing indexes on filtered/joined columns
274
+ - [ ] `SELECT *` instead of specific columns
275
+ - [ ] N+1 query patterns
276
+ - [ ] Missing `LIMIT` on large tables
277
+ - [ ] Not handling `NULL` comparisons correctly (`IS NULL` vs `= NULL`)
278
+ - [ ] Missing transactions for related operations
279
+ - [ ] Incorrect JOIN types
280
+ - [ ] Collation / case sensitivity surprises across databases (MySQL vs Postgres defaults)
281
+ - [ ] Date and timezone handling errors (naive timestamps, server-local `NOW()`, DST)
282
+
283
+ **See also:** [Security Review Guide](security-review-guide.md) for SQL injection prevention
284
+
285
+ ## API Design
286
+
287
+ - [ ] Inconsistent resource naming
288
+ - [ ] Wrong HTTP methods (POST for idempotent operations)
289
+ - [ ] Missing pagination for list endpoints
290
+ - [ ] Incorrect status codes
291
+ - [ ] Missing rate limiting
292
+ - [ ] Missing input validation and sanitization
293
+ - [ ] Trusting client-side validation only
294
+
295
+ ## Testing
296
+
297
+ - [ ] Testing implementation details instead of behavior
298
+ - [ ] Missing edge case tests
299
+ - [ ] Flaky tests (non-deterministic)
300
+ - [ ] Tests with external dependencies (no mocks)
301
+ - [ ] Missing negative tests (error cases)
302
+ - [ ] Overly complex test setup