Skip to content

Commit 5f17686

Browse files
chore: add spell check step to code-smell command
Runs cspell before structural analysis. Reports unknown words at Smell severity. Points to .cspell.json for adding project-specific terms. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent 12d8375 commit 5f17686

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

.claude/commands/code-smell.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: code-smell
3-
description: Standalone structural smell analysis — long methods, dead code, misplaced validation, deep nesting, magic numbers. Does not check patterns or security.
3+
description: Structural smell analysis + spell check — long methods, dead code, misplaced validation, deep nesting, magic numbers. Does not check patterns or security.
44
paths:
55
- src/main/java/**/*.java
66
---
@@ -20,6 +20,18 @@ Use `$ARGUMENTS` to determine scope:
2020

2121
---
2222

23+
## Spell check
24+
25+
Before analysing smells, run cspell on the files in scope:
26+
27+
```bash
28+
npx cspell --no-progress "src/**/*.java" ".claude/**/*.md" "CLAUDE.md" "docs/**/*.md" 2>&1 | grep "Unknown word"
29+
```
30+
31+
Report any spelling violations at **Smell** severity in the per-file table. The word list is in `.cspell.json` — add legitimate project-specific terms there rather than fixing them as typos.
32+
33+
---
34+
2335
## What Are Code Smells
2436

2537
Code smells are structural signals — they do not necessarily mean the code is broken, but they indicate areas of technical debt, reduced readability, or future maintenance risk. All findings are reported at **Smell** severity and do not block merge unless they indicate a design violation.

0 commit comments

Comments
 (0)