Skip to content

Conversation

@levi42x
Copy link

@levi42x levi42x commented Nov 20, 2025

Fixes #3659

Normalize bracketed copyright markers [C] and [c] so they are correctly detected.

Summary

  • [C] / [c] were stripped during preprocessing, leaving plain C / c
  • This caused copyright detection to fail
  • Added normalization in prepare_text_line() to convert [C] and [c] to (c) before bracket removal

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 📑 and links the original issue above 🔗
  • Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
    Run tests locally to check for errors.
  • Commits are in uniquely-named feature branch and has no merge conflicts 📁
  • Updated documentation pages (if applicable)
  • Updated CHANGELOG.rst (if applicable)

Signed-off-by: Shekhar Suman levi42x@gmail.com

…ection

- Normalize [C] and [c] before bracket removal in prepare_text_line()
- Add tests for both [C] and [c] variants

Signed-off-by: Shekhar <shekharsuman0397@gmail.com>
Copy link
Member

@AyanSinhaMahapatra AyanSinhaMahapatra left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @levi42x
See comments for some minor changes and we're good to merge.

Signed-off-by: Shekhar Suman <levi42x@gmail.com>
@levi42x
Copy link
Author

levi42x commented Dec 17, 2025

Hi @AyanSinhaMahapatra,
I’ve implemented the suggested updates. The changes are finalized and ready for merge.

Signed-off-by: Shekhar Suman <levi42x@gmail.com>
Signed-off-by: Shekhar Suman <levi42x@gmail.com>
@levi42x
Copy link
Author

levi42x commented Jan 28, 2026

Hey Ayan,

The remaining CI failure is in (core_tests misc_and_scancode) and appears unrelated to this change.
It fails during scancode CLI execution on Azure (Python 3.14) with a signal/threading error.

All tests related to [C]/[c] normalization and ignorable metadata pass.

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.

Invalid copyright not detected

2 participants