Skip to content

Fix author detection for compact dotted names (#4229) - #5308

Open
Hrithikcrick wants to merge 2 commits into
aboutcode-org:developfrom
Hrithikcrick:fix-author-detection-4229
Open

Fix author detection for compact dotted names (#4229)#5308
Hrithikcrick wants to merge 2 commits into
aboutcode-org:developfrom
Hrithikcrick:fix-author-detection-4229

Conversation

@Hrithikcrick

@Hrithikcrick Hrithikcrick commented Sep 11, 2026

Copy link
Copy Markdown

Fixes #4229

Summary

Fixes author detection for compact dotted author declarations such as:

Author:Frankie.Chu

The implementation is intentionally scoped to author-tag context so unrelated dotted tokens are not globally classified as names.

Changes

  • Normalize compact Author: declarations before tokenization.
  • Handle dotted names only when they follow an Author tag.
  • Avoid the broader global dotted-name lexer rule that caused unrelated license-validation regressions.
  • Add regression coverage for the exact case reported in Author not detected in C++ file #4229.

Testing

  • Targeted author regression test: passed.
  • Basic copyright detection tests: passed.
  • Previously failing license-validation shards: 14,989 passed.
  • Full hosted Azure pipeline: passed with 0 errors.
  • ReadTheDocs: passed.
  • git diff --check: clean.

Files changed

  • src/cluecode/copyrights.py
  • tests/cluecode/test_copyrights_basic.py

Signed-off-by: Hrithik Sharma <sharmahrithik2806@gmail.com>
Signed-off-by: Hrithik Sharma <sharmahrithik2806@gmail.com>
@Hrithikcrick

Copy link
Copy Markdown
Author

Updated after CI validation: the broad dotted-name lexer behavior was removed and the handling is now scoped to Author context.

The previously failing license-validation shards pass locally, the full Azure build now succeeds with 0 errors, and ReadTheDocs is green.

The remaining GitHub Actions workflows are awaiting maintainer approval.

Ready for review. Thanks!

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.

Author not detected in C++ file

1 participant