fix: Integrate typos tool into CI#7011
fix: Integrate typos tool into CI#7011SolariSystems wants to merge 3 commits intoprojectdiscovery:devfrom
Conversation
Neo - PR Security ReviewNo security issues found Highlights
Hardening NotesComment |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughExpanded Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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
🤖 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 12-18: The extend-exclude list is missing the Japanese README; add
"README_JP.md" to the extend-exclude array alongside "README_CN.md",
"README_KR.md", "README_ID.md", "README_ES.md", "README_PT-BR.md", and
"README_TR.md" so all seven translations are excluded consistently.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
.github/workflows/typos.yamlis excluded by!**/*.yaml
📒 Files selected for processing (1)
_typos.toml
Add README_JP.md and several other file exclusions (embedded certs, test fixtures, fuzz playground seeds, base64 data) that produce false positives. Add word exceptions for existing codebase identifiers (Exluded, Reuests, seperate, etc.) and CLI flag short names (-ot, -ue, -hae, -fo) that typos flags as misspellings. Verified: `typos` now exits 0 on the full repository.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
_typos.toml (1)
53-67: Consider scoping identifier suppressions to[default.extend-identifiers].All misspelled API names here (
Splitted,Formated,seperate,pannel,noticable, etc.) are in[default.extend-words], which silences these tokens in all contexts — including future prose, comments, and string literals. Theextend-wordstable maps word typos to their corrections; when the correction is the key, the word is always valid. By contrast,[default.extend-identifiers]maps identifier typos to their corrections; when the correction is the key, the identifier is always valid — scoped to the identifier level before word-splitting.Moving these entries to
[default.extend-identifiers](as the official docs demonstrate withAttributeIDSupressMenu = "AttributeIDSupressMenu") would still suppress the existing broken names while allowing CI to catch the same misspellings in comments or docs going forward.♻️ Suggested restructuring
-# Existing identifier / variable names in the codebase -# (renaming would break API compatibility or require a separate refactor) -Exluded = "Exluded" -Reuests = "Reuests" -Noo = "Noo" -Splitted = "Splitted" -splitted = "splitted" -Formated = "Formated" -formated = "formated" -Allowd = "Allowd" -Inactiv = "Inactiv" -Mis = "Mis" -seperate = "seperate" -fiter = "fiter" -thant = "thant" -pannel = "pannel" -noticable = "noticable"Add a new section after
[default.extend-words]:[default.extend-identifiers] # Existing identifier / variable names in the codebase # (renaming would break API compatibility or require a separate refactor) Exluded = "Exluded" Reuests = "Reuests" Noo = "Noo" Splitted = "Splitted" splitted = "splitted" Formated = "Formated" formated = "formated" Allowd = "Allowd" Inactiv = "Inactiv" Mis = "Mis" seperate = "seperate" fiter = "fiter" thant = "thant" pannel = "pannel" noticable = "noticable"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@_typos.toml` around lines 53 - 67, Move the listed misspelled API names out of [default.extend-words] and into a new [default.extend-identifiers] table so they only suppress identifier-level typos; specifically add an entry under [default.extend-identifiers] containing the keys Exluded, Reuests, Noo, Splitted, splitted, Formated, formated, Allowd, Inactiv, Mis, seperate, fiter, thant, pannel, and noticable mapped to themselves (e.g., Exluded = "Exluded") so these broken identifiers remain allowed in code while allowing CI to catch the same misspellings in comments, docs, and strings.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@_typos.toml`:
- Around line 53-67: Move the listed misspelled API names out of
[default.extend-words] and into a new [default.extend-identifiers] table so they
only suppress identifier-level typos; specifically add an entry under
[default.extend-identifiers] containing the keys Exluded, Reuests, Noo,
Splitted, splitted, Formated, formated, Allowd, Inactiv, Mis, seperate, fiter,
thant, pannel, and noticable mapped to themselves (e.g., Exluded = "Exluded") so
these broken identifiers remain allowed in code while allowing CI to catch the
same misspellings in comments, docs, and strings.
… typos Remove six unnecessary entries from [default.extend-words] in _typos.toml: - seperate, fiter, thant: fix the actual comment typos instead of suppressing them (sdk_test.go, config.go, flow_executor_test.go) - pannel, noticable: only appeared in already-excluded integration_tests/ - Inactiv: dead entry, not referenced anywhere in the codebase Keep compound-identifier sub-words (Exluded, Reuests, Splitted, Formated, Allowd, Noo, Mis) at the word level since they appear as sub-words after identifier splitting (e.g. ExludedDastTmplStats, originalSplitted) and extend-identifiers only matches full identifiers. Addresses CodeRabbit nitpick on lines 53-67.
70355f0 to
01ea1d8
Compare
|
Thanks for the review suggestion on scoping suppressions to I investigated this and unfortunately
Since |
|
Closing — the typos CI integration was already merged in #6533. Thank you. |
Summary
Fixes #6532
Create a new GitHub Actions workflow file that runs the crate-ci/typos tool on push and pull_request events, plus a
_typos.tomlconfiguration file to suppress false positives from domain-specific terms (security/networking jargon, variable names, test fixtures, binary/encoded data). The 'slight tweak' @dwisiswant0 mentioned refers to needing this config to avoid flagging legitimate domain terms.Changes Made
The workflow follows established repo patterns (pinned @v1 action version, concurrency group, matching triggers), and the config provides thorough structural exclusions for generated/binary/non-English files. The known
worflowfilename typo is handled pragmatically.Verification
Summary by CodeRabbit
Chores
Style
/claim #6532