-
-
Notifications
You must be signed in to change notification settings - Fork 711
Detect plantuml license#4666
Conversation
Fixes #4579
Summary
This PR adds license detection support for PlantUML's unique multi-license structure, where users can choose from MIT, Apache-2.0, EPL-2.0, LGPL-3.0+, or GPL-3.0+.
Changes
- Added
plantuml_1.RULE: New license detection rule that identifies PlantUML's license notice from their README, capturing the full disjunctive license expression(mit OR apache-2.0 OR epl-2.0 OR lgpl-3.0-plus OR gpl-3.0-plus) - Added
false-positive-plantuml_1.RULE: False positive rule to prevent incorrect GPL-2. 0 detection from PlantUML's Javadoc badge URL that contains "gplv2" in the path - Added test case:
plantuml_license_notice.txtand corresponding.ymlfile to validate the detection rule
Testing
Included data-driven test case in tests/licensedcode/data/datadriven/lic4/ to ensure accurate detection of PlantUML's multi-license notice.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds license detection support for PlantUML's multi-license structure, allowing users to choose from MIT, Apache-2.0, EPL-2.0, LGPL-3.0+, or GPL-3.0+.
- Added new license detection rule
plantuml_1.RULEto identify PlantUML's disjunctive license expression from their README - Added false positive rule to prevent incorrect GPL-2.0 detection from PlantUML's Javadoc badge URL
- Added test case to validate the detection rule
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/licensedcode/data/rules/plantuml_1.RULE |
New license detection rule for PlantUML's multi-license notice with disjunctive expression |
src/licensedcode/data/rules/false-positive-plantuml_1.RULE |
False positive rule to prevent GPL-2.0 detection from javadoc badge URL |
tests/licensedcode/data/datadriven/lic4/plantuml_license_notice.txt |
Test input file containing PlantUML's license notice from their README |
tests/licensedcode/data/datadriven/lic4/plantuml_license_notice.txt.yml |
Expected test output defining the disjunctive license expression |
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
AyanSinhaMahapatra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @uttam282005! LGTM
Merging!
b2c4bd0
into
aboutcode-org:develop