Skip to content

Add new and improved license rules - #1337

Merged
pombredanne merged 35 commits into
developfrom
new-and-improved-license-rules2
Jan 31, 2019
Merged

pombredanne merged 35 commits into
developfrom
new-and-improved-license-rules2

Conversation

@pombredanne

@pombredanne pombredanne commented Jan 24, 2019

Copy link
Copy Markdown
Member

This is a set of new licenses and license detection rules
And in particular a fix for #1336 as reported by @dankegel
Also has fixes for #1344 #1345 #1346 #1347 #1348 #1335 several of which have beeen reported by @armijnhemel and several Linux-related issues reported privately by kernel maintainers.

Signed-off-by: Philippe Ombredanne pombredanne@nexb.com

Here an x11-fsf was incorrectly returned.

Reported-by: Dan Kegel @dankegel
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
 * Refine and review remaining bare GPL rules

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
@codecov

codecov Bot commented Jan 25, 2019

Copy link
Copy Markdown

Codecov Report

Merging #1337 into develop will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1337      +/-   ##
===========================================
+ Coverage    84.17%   84.21%   +0.03%     
===========================================
  Files          117      117              
  Lines        13154    13154              
===========================================
+ Hits         11073    11078       +5     
+ Misses        2081     2076       -5
Impacted Files Coverage Δ
src/scancode/cli.py 76.88% <0%> (+0.78%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dbdc885...b057041. Read the comment docs.

@codecov

codecov Bot commented Jan 25, 2019

Copy link
Copy Markdown

Codecov Report

Merging #1337 into develop will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1337      +/-   ##
===========================================
- Coverage    84.17%   84.17%   -0.01%     
===========================================
  Files          117      117              
  Lines        13154    13175      +21     
===========================================
+ Hits         11073    11090      +17     
- Misses        2081     2085       +4
Impacted Files Coverage Δ
src/scancode/api.py 93.33% <0%> (-1.49%) ⬇️
src/typecode/contenttype.py 84.29% <0%> (-0.2%) ⬇️
src/licensedcode/frequent_tokens.py 100% <0%> (ø) ⬆️
src/licensedcode/models.py 81.18% <0%> (+0.06%) ⬆️
src/licensedcode/match.py 83.36% <0%> (+0.29%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dbdc885...5ea1b24. Read the comment docs.

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Otherwise this was detected by gpl-2.0-_300.RULE as a gpl-2.0 license.

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Otherwise this was detected as a gpl-2.0 license.

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
This is a bona-fide notice

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Otherwise this was detected by gpl-2.0-plus_220.RULE as a
gpl-2.0-plus license.

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Otherwise this was detected as a gpl-2.0 license.

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Otherwise this was detected as a gpl-2.0 license.

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
These are rare yet seen in some popular NuGet packages

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Several are not detected. Added some new licenses too.

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
This adds a new rule, but the expectations are not yet correct and will
evolve when license detection is enabled in Maven tests

Reported-by: Li Ha @linexb
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
- Add new rule attribute: only_known_words.
  with this attribute set to yes, a rule can be matched only if no
  unknown words are found in the matched range. This is useful for some
  small rule that could otherwise be matched as false positives with
  some unknown (and therefore unmatched) tokens in their range
- Add new qmagnitude, qrange and qdensity methods to LicenseMatch that
  are used in score computation and filtering as well as to determine
  if there are unknown tokens within a matched range (e.g. on the query
  side hence the "q" prefix)
- Add new match filtering function "filter_if_only_known_words_rule"
  that use the new rule flag and related methods.
- cleanup logging code in refine_matches() function

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Add referenced_filenames and relevance attributes as needed

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Most rules are fixing detection issues found when scanning the Linux
Kernel

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
This adds several misc detection rules.

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
This are different enough to warrant an addition

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Treat all media and .ppm and .pgm in particualr as not containing
text (and therefore not scanned for copyrights and licenses)

Reported-by: Armijn Hemel @armijnhemel
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Add new rules to avoid confusion with an Apache notice

Reported-by: Armijn Hemel @armijnhemel
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Reported-by: Armijn Hemel @armijnhemel
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Fix tests

Reported-by: Armijn Hemel @armijnhemel
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
http://www.w3.org/XML/1998/namespace and http://www.w3.org/2000/xmlns/

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
@pombredanne
pombredanne merged commit cd260b7 into develop Jan 31, 2019
@pombredanne
pombredanne deleted the new-and-improved-license-rules2 branch January 31, 2019 15:42
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.

1 participant