Skip to content

ci: integrate typos spell checker#6962

Open
sharkqwy wants to merge 2 commits intoprojectdiscovery:devfrom
sharkqwy:feat/typos-ci
Open

ci: integrate typos spell checker#6962
sharkqwy wants to merge 2 commits intoprojectdiscovery:devfrom
sharkqwy:feat/typos-ci

Conversation

@sharkqwy
Copy link

@sharkqwy sharkqwy commented Feb 19, 2026

Fixes #6532

Adds the crate-ci/typos GitHub Action to CI to automatically catch spelling errors in future PRs.

Changes

  • Added .github/workflows/typos.yml — runs typos spell checker on push to dev, PRs, and manual dispatch
  • Added _typos.toml — configuration to exclude non-English READMEs, test fixtures, and known false positives from intentional identifiers
  • Fixed a few remaining typos in comments (fiterfilter, seperateseparate, thantthat)

Ref: #6521

Summary by CodeRabbit

  • Chores
    • Added typo-checker configuration to expand ignored paths, recognize additional words and identifiers, and reduce false positives.
    • Fixed spelling and wording in comments across tests and libraries to improve clarity and documentation quality.

@auto-assign auto-assign bot requested a review from dwisiswant0 February 19, 2026 14:28
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 19, 2026

No actionable comments were generated in the recent review. 🎉


Walkthrough

Adds a new _typos.toml configuration for the typos lint tool (exclude lists, ignore patterns, extended words/identifiers) and corrects minor spelling mistakes in code comments across three Go test/config files.

Changes

Cohort / File(s) Summary
Typos Tool Configuration
\_typos.toml
Adds typos checker configuration: file exclude patterns, extend-ignore regexes, extended word mappings, and identifier corrections.
Comment Corrections
lib/config.go, lib/tests/sdk_test.go, pkg/tmplexec/flow/flow_executor_test.go
Fixes small spelling errors in comments/documentation: "fiter" → "filter", "seperate" → "separate" (three occurrences), "thant" → "that".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Poem

🐰
I hopped through lines both short and long,
Found misspelled whispers, sang a tidy song,
A config stitched to hush the typo throng,
Now code prances right, all tidy and strong. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly and concisely describes the primary change: integrating a typos spell checker into the CI pipeline, which aligns with the main objective.
Linked Issues check ✅ Passed All coding requirements from issue #6532 are met: typos tool is integrated into CI via workflow, configuration file excludes false positives, and actual typos in comments are fixed.
Out of Scope Changes check ✅ Passed All changes are directly related to integrating the typos spell checker and fixing typos. No out-of-scope modifications detected beyond the stated objectives.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
_typos.toml (1)

1-21: Consider narrowing exclusion for pkg/model/worflow_loader.go to 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 worflow is already listed in extend-identifiers (line 60), consider removing this file from extend-exclude and 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.

Comment on lines 48 to 61
[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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 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
done

Repository: 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)
@sharkqwy
Copy link
Author

Addressed the review feedback:

  • Removed pkg/model/worflow_loader.go from extend-exclude — the worflow entry in extend-identifiers already handles the filename typo, so the blanket exclusion was unnecessary.
  • Removed dead Fo identifier — no longer used anywhere in the codebase.

Kept the following (still actively used):

  • Reuests / PostReuestsHandlerRequest — used in internal/server/server.go
  • worflow — file pkg/model/worflow_loader.go still exists with this naming

Thanks for the review @coderabbitai!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 20, 2026

Tip

For best results, initiate chat on the files or code changes.

@sharkqwy Thank you for the thorough update! Your approach makes perfect sense:

✅ Removing the blanket exclusion for worflow_loader.go while keeping the identifier mapping is the right call—it ensures the typo checker can still scan the file's contents.

✅ Cleaning up the unused Fo identifier keeps the configuration lean.

✅ 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate typos tool into CI

1 participant