You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: {{cookiecutter.project_slug}}/.opencode/skills/code-quality/SKILL.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -264,6 +264,25 @@ jobs:
264
264
265
265
### 8. Quality Issue Resolution
266
266
267
+
#### CRITICAL: Never Silence Warnings with noqa
268
+
**Golden Rule**: When ruff reports an issue, ALWAYS check the documentation to understand how to fix it properly. Never use `noqa` comments to silence warnings.
269
+
270
+
For any ruff rule (like RUF069, F841, etc.):
271
+
1. Look up the rule at https://docs.astral.sh/ruff/rules/
272
+
2. Read the "How to fix" section
273
+
3. Apply the proper solution
274
+
4. Only use noqa as a last resort when no proper fix exists
275
+
276
+
Example workflow for RUF069 (float-equality-comparison):
277
+
```bash
278
+
# WRONG - just silencing the warning
279
+
assert value == 10.0 # noqa: RUF069
280
+
281
+
# RIGHT - using math.isclose() as per ruff docs
282
+
import math
283
+
assert math.isclose(value, 10.0, abs_tol=1e-9)
284
+
```
285
+
267
286
#### Common Ruff Issues and Fixes
268
287
```python
269
288
# Issue: ANN001 - Missing type hint for function argument
0 commit comments