Skip to content

fix: skip class extraction for languages with class_start=None - #2188

Merged
squid-protocol merged 1 commit into
mainfrom
fix/issue-1925-class-start-none
Aug 23, 2026
Merged

fix: skip class extraction for languages with class_start=None#2188
squid-protocol merged 1 commit into
mainfrom
fix/issue-1925-class-start-none

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

This PR fixes a bug where languages explicitly opting out of class extraction (class_start: None) were falling back to the generic C-family OOP regex instead of actually skipping extraction.

This caused 4 false-positive "classes" in m4 to be identified because it found C structs inside an AC_LANG_PROGRAM macro argument. The fallback is now only used when class_start is actually undefined, not when it is explicitly set to None.

All tests pass, and the tri-comparison ledger has been regenerated (the m4/class/existence/agree[gitgalaxy]_vs[ctags] discrepancies have disappeared as expected).

Resolves #1925

Comment thread gitgalaxy/core/detector.py Fixed
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol force-pushed the fix/issue-1925-class-start-none branch from 0fc865c to 99ab299 Compare August 23, 2026 21:43
Fixes a bug where languages explicitly opting out of class extraction (class_start: None) were falling back to a generic regex and incorrectly finding classes in embedded snippets (e.g., m4 finding C structs in autoconf tests).

Resolves #1925
@squid-protocol
squid-protocol force-pushed the fix/issue-1925-class-start-none branch from 99ab299 to e213033 Compare August 23, 2026 21:51
@squid-protocol
squid-protocol merged commit 4fd9ee3 into main Aug 23, 2026
30 checks passed
@squid-protocol
squid-protocol deleted the fix/issue-1925-class-start-none branch August 23, 2026 22:09
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.

detector.py's class fallback doesn't skip languages with class_start=None, causing false-positive class extraction (confirmed: m4)

2 participants