Skip to content

Conversation

@Kaushik-Kumar-CEG
Copy link

@Kaushik-Kumar-CEG Kaushik-Kumar-CEG commented Dec 30, 2025

Fixes #4584

Description

This PR fixes an incorrect license detection in NumPy's dragon4.c, where the text "As a special exception" was incorrectly triggering a generic-exception match.

Changes:

  • Modified license-intro_8.RULE: Downgraded this rule from is_license_intro to is_license_clue. This ensures the phrase contributes to evidence but does not trigger a false positive when found alone.
  • Added false-positive_dragon4.RULE: Added a specific false positive rule to ignore the misleading text ("As a special exception the smallest normal value") found in dragon4.c.

Verification:

  • Reproduced the issue locally: confirmed generic-exception was originally detected.
  • Verified the fix: confirmed the detection is gone after the changes.
  • Validated the rule downgrade: confirmed that license-intro_8.RULE correctly behaves as a clue (no detection) when isolated.

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 (Verified fix locally)
  • Commits are in uniquely-named feature branch and has no merge conflicts 📂
  • Updated documentation pages (if applicable)
  • Updated CHANGELOG.rst (if applicable)

@Kaushik-Kumar-CEG Kaushik-Kumar-CEG force-pushed the fix-issue-4584 branch 2 times, most recently from 4b4cfb7 to c0a80f5 Compare January 6, 2026 11:49
- Change 'license-intro_8.RULE' to a license clue to prevent false positives.
- Add 'false-positive_dragon4.RULE' to ignore specific text in NumPy.

Fixes aboutcode-org#4584

Signed-off-by: Kaushik <[email protected]>
@Kaushik-Kumar-CEG
Copy link
Author

Kaushik-Kumar-CEG commented Jan 18, 2026

@pombredanne @AyanSinhaMahapatra

This PR resolves the false positive generic-exception detection in dragon4.c. Verified the fix, it works locally.

All checks have passed

Ready for your review!

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.

Incorrect license detection

1 participant