Skip to content

Update codespell configuration to reduce false positives#1136

Merged
christos68k merged 7 commits into
open-telemetry:mainfrom
gyanranjanpanda:fix-codespell-false-positives
Feb 5, 2026
Merged

Update codespell configuration to reduce false positives#1136
christos68k merged 7 commits into
open-telemetry:mainfrom
gyanranjanpanda:fix-codespell-false-positives

Conversation

@gyanranjanpanda
Copy link
Copy Markdown
Contributor

Fixes #1108

Summary

This PR updates the codespell configuration to reduce false positives by adding an ignore-regex pattern that skips common code constructs while still checking natural language text in comments and documentation.

Changes

  • Added ignore-regex to .codespellrc to skip:
    • camelCase identifiers (e.g., myVariable, someFunction)
    • snake_case identifiers (e.g., my_variable, some_function)
    • Hexadecimal numbers (e.g., 0x1234)
    • Import/package/use/include statements

Testing

The existing CI workflow will verify that codespell runs successfully with the new configuration. The updated regex pattern significantly reduces false positives on code elements while maintaining spell checking for comments and documentation.

@gyanranjanpanda gyanranjanpanda requested review from a team as code owners January 29, 2026 07:45
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Jan 29, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

@gyanranjanpanda gyanranjanpanda force-pushed the fix-codespell-false-positives branch from b86dd34 to dc528de Compare January 29, 2026 07:54
@christos68k
Copy link
Copy Markdown
Member

Hi @gyanranjanpanda can you update your PR to take the (just merged) #1119 into account? Thanks!

Configure codespell to skip common code patterns and focus on checking
natural language text in comments and documentation. This addresses
issue open-telemetry#1108 where codespell was flooding output with false positives
on variable names and code constructs.

The ignore-regex pattern now skips:
- camelCase identifiers
- snake_case identifiers
- hexadecimal numbers
- import/package/use/include statements

Fixes open-telemetry#1108
@gyanranjanpanda gyanranjanpanda force-pushed the fix-codespell-false-positives branch from dc528de to fbf880b Compare January 29, 2026 20:43
@gyanranjanpanda
Copy link
Copy Markdown
Contributor Author

Thanks @christos68k! I've rebased on the latest main to include the changes from #1119.

I resolved the conflict in
.codespellrc
by merging the configurations: I kept the updated upstream CamelCase regex (which allows numbers) and combined it with the additional ignore patterns from this PR (for snake_case, hex values, etc.).

Required checks should be running now.

Comment thread .codespellrc Outdated
@gyanranjanpanda gyanranjanpanda force-pushed the fix-codespell-false-positives branch from 44ae37b to b94e9c5 Compare February 2, 2026 14:03
@gyanranjanpanda
Copy link
Copy Markdown
Contributor Author

hi @christos68k ,@rogercoll
if any thing i have to change pls let me know

Comment thread rust-crates/symblib/README.md Outdated

- in every stack trace, all[^all] frames except for the last one will always be a
return addresses thats follow a call
return addresses that's follow a call
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
return addresses that's follow a call
return address that follows a call

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you for catching that! You're absolutely right - I've updated line 110 to fix the grammar. The change has been pushed.

Please let me know if there's anything else that needs adjustment!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's still not correct, see my suggestion

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i did it what u want if i have to do any thing pls let me know

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For future reference, I think it's just easier to accept a reviewer's suggestion in the GH UI instead of reimplementing it. It saves time (as the reviewer can see that the suggestion was implemented exactly as given and doesn't have to check again) and avoids errors like the one that took place here.

@christos68k christos68k merged commit 4ca022e into open-telemetry:main Feb 5, 2026
1 check passed
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.

Update codespell configuration to reduce false positives

3 participants