Skip to content

Generate rules automatically using github search API #4479

@AyanSinhaMahapatra

Description

@AyanSinhaMahapatra

There are a lot of new licenses added and it is nice if we have a script to automate searching for rules for these licenses and adding these as rules.

For example in #4478 we had the following licenses added:
new_licenses.txt

The steps roughly are:

  • Get the new licenses using synclic (license sync) scripts
  • Get the new license keys (using GitPython: read changed files)
  • Get the license names to search for (might have to search without version numbers too)
  • Use github search API to search for license occurances (remove scancode/licensedb related search results)
  • run license detection to see if we detect these correctly
  • if license not detected correctly add as rules:

I have this working roughly, but this needs some improvements and the new license matcher. Will add the script soon.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions