ci: integrate typos spell checker#6962
ci: integrate typos spell checker#6962sharkqwy wants to merge 2 commits intoprojectdiscovery:devfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 WalkthroughAdds a new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
_typos.toml (1)
1-21: Consider narrowing exclusion forpkg/model/worflow_loader.goto prevent hiding other potential typos in the file.The current approach excludes the entire file (line 4), which suppresses checking not just the filename typo but also any other genuine typos that might exist in the file's content. Since
worflowis already listed inextend-identifiers(line 60), consider removing this file fromextend-excludeand relying on the identifier suppression instead. This keeps the filename typo suppressed while still checking the rest of the file for other issues.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@_typos.toml` around lines 1 - 21, Remove the blanket file exclusion for "pkg/model/worflow_loader.go" from the extend-exclude list so the file's contents remain linted, and instead ensure the typo identifier "worflow" is present in extend-identifiers (or add it if missing) so only the filename typo is suppressed; specifically, delete the "pkg/model/worflow_loader.go" entry from the extend-exclude block and verify "worflow" appears in the extend-identifiers section to keep content checks active while silencing the known filename typo.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@_typos.toml`:
- Around line 48-61: Remove the three dead suppressed identifiers from the
extend-identifiers table in _typos.toml: delete the entries Reuests = "Reuests",
Fo = "Fo", and worflow = "worflow"; keep the other existing identifiers
untouched and then commit the updated config so the typo detector will no longer
ignore those misspellings.
---
Nitpick comments:
In `@_typos.toml`:
- Around line 1-21: Remove the blanket file exclusion for
"pkg/model/worflow_loader.go" from the extend-exclude list so the file's
contents remain linted, and instead ensure the typo identifier "worflow" is
present in extend-identifiers (or add it if missing) so only the filename typo
is suppressed; specifically, delete the "pkg/model/worflow_loader.go" entry from
the extend-exclude block and verify "worflow" appears in the extend-identifiers
section to keep content checks active while silencing the known filename typo.
| [default.extend-identifiers] | ||
| # Existing Go identifiers (renaming would be a breaking change) | ||
| formated = "formated" | ||
| isFormated = "isFormated" | ||
| formatedTemplateData = "formatedTemplateData" | ||
| Reuests = "Reuests" | ||
| PostReuestsHandlerRequest = "PostReuestsHandlerRequest" | ||
| MisMatched = "MisMatched" | ||
| fo = "fo" | ||
| Fo = "Fo" | ||
| ExludedDastTmplStats = "ExludedDastTmplStats" | ||
| AllowdTypes = "AllowdTypes" | ||
| worflow = "worflow" | ||
| inFo = "inFo" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check that each suppressed identifier actually appears in Go source files
echo "=== Checking extend-identifiers usage ==="
for ident in formated isFormated formatedTemplateData Reuests PostReuestsHandlerRequest MisMatched fo Fo ExludedDastTmplStats AllowdTypes worflow inFo; do
count=$(rg --type=go -w "$ident" | wc -l)
if [ "$count" -eq 0 ]; then
echo "❌ $ident: NOT FOUND"
else
echo "✓ $ident: found in $count occurrence(s)"
fi
doneRepository: projectdiscovery/nuclei
Length of output: 537
Remove dead config entries for identifiers that no longer exist in the codebase.
Verification shows that three suppressed identifiers are no longer used in Go source files and should be removed from extend-identifiers:
Reuests = "Reuests"Fo = "Fo"worflow = "worflow"
These dead entries suppress typo detection for misspellings that no longer exist, creating a maintenance burden and risking future typos using the same misspellings.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@_typos.toml` around lines 48 - 61, Remove the three dead suppressed
identifiers from the extend-identifiers table in _typos.toml: delete the entries
Reuests = "Reuests", Fo = "Fo", and worflow = "worflow"; keep the other existing
identifiers untouched and then commit the updated config so the typo detector
will no longer ignore those misspellings.
…usions - Remove pkg/model/worflow_loader.go from extend-exclude (worflow in extend-identifiers already handles the filename typo) - Remove dead Fo identifier (no longer used in codebase) - Keep Reuests/PostReuestsHandlerRequest (still used in server.go) - Keep worflow (file pkg/model/worflow_loader.go still exists)
ef738b9 to
4495863
Compare
|
Addressed the review feedback:
Kept the following (still actively used):
Thanks for the review @coderabbitai! |
|
Tip For best results, initiate chat on the files or code changes.
✅ Removing the blanket exclusion for ✅ Cleaning up the unused ✅ Retaining the actively used misspelled identifiers prevents breaking existing code while still allowing the checker to work. Great work addressing the feedback! 🎉 If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! |
Fixes #6532
Adds the crate-ci/typos GitHub Action to CI to automatically catch spelling errors in future PRs.
Changes
.github/workflows/typos.yml— runs typos spell checker on push to dev, PRs, and manual dispatch_typos.toml— configuration to exclude non-English READMEs, test fixtures, and known false positives from intentional identifiersfiter→filter,seperate→separate,thant→that)Ref: #6521
Summary by CodeRabbit