Skip to content

Conversation

@NullPointer-cell
Copy link

@NullPointer-cell NullPointer-cell commented Jan 15, 2026

Fixes #4576

Problem

ScanCode failed to detect BSD-3-Clause license in JLine packages (jline-console, jline-style, jline-reader) because the license is declared in XML comments rather than standard Maven <licenses> tags.

Solution

Added detection rule bsd-new_jline_xml.RULE to recognize the specific BSD license notice pattern found in JLine project POM files.

Testing

✅ Verified detection on jline-console-3.30.4-sources.jar

  • License detected: BSD-3-Clause
  • Match coverage: 89.47%
  • Rule used: bsd-new_jline_xml.RULE
    The same pattern appears in jline-style and jline-reader, so this rule covers all three packages.

Changes

  • Added: src/licensedcode/data/rules/bsd-new_jline_xml.RULE

✅ Verification Complete - BSD License Detection Working

I've verified the fix works correctly with the actual JLine package from Maven Central.

Test Results

Package tested: jline-console-3.30.4-sources.jar from Maven Central

Before fix:

  • License: Not detected
  • Reason: BSD license in XML comments not recognized

After fix:

  • ✅ License detected: bsd-new (BSD-3-Clause)
  • ✅ Rule used: bsd-new_jline_xml.RULE
  • ✅ Match coverage: 89.47%
  • ✅ Detection location: META-INF/maven/org.jline/jline-console/pom.xml

Evidence

The POM file contains:

<!--
  Copyright (c) 2002-2020, the original author or authors.
  This software is distributable under the BSD license.
  https://opensource.org/licenses/BSD-3-Clause
-->

ScanCode now correctly detects this as BSD-3-Clause using the custom rule.

The BSD license detection fix is working as intended and ready for merge. ✅ETA-INF/maven/org.jline/jline-console/pom.xml

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
  • 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: NullPointer-cell [email protected]

NullPointer-cell added 4 commits January 15, 2026 13:15
Fixes aboutcode-org#4576

Adds bsd-new_jline_xml.RULE to detect BSD-3-Clause license in JLine POM files
License was previously undetected because it was in XML comments
Tested on jline-console, applies to jline-style and jline-reader as well

Signed-off-by: NullPointer-cell <[email protected]>
Remove ignorable_urls field to fix CI validation test failures

Signed-off-by: NullPointer-cell <[email protected]>
The URL in the license text must be declared in ignorable_urls
to pass CI validation checks.

Signed-off-by: NullPointer-cell <[email protected]>
Added ignorable_copyrights and ignorable_holders to match
the copyright statement and holder in the license text.
This fixes the CI validation test.

Signed-off-by: NullPointer-cell <[email protected]>
@NullPointer-cell
Copy link
Author

NullPointer-cell commented Jan 16, 2026

@Kannan-3757
i hace done the fixing

The original issue (BSD license not detected in JLine packages) is now resolved. The test_ignorables_in_rule_or_license_bsd_new_jline_xml validation test is passing.

The current CI failure in 3.14 - misc_and_scancode is unrelated to this PR:

  • Error: ValueError: signal only works in main thread in test_interrupt.py
  • This is a Python 3.14 compatibility issue in the test framework
  • My changes only added one license rule file

The BSD license detection for JLine packages is working as required and is ready for 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.

Failed to scan BSD license

1 participant