Skip to content

introduce unknown license list#75

Merged
sagikazarmark merged 1 commit intogoph:masterfrom
rumenvasilev:master
Sep 12, 2023
Merged

introduce unknown license list#75
sagikazarmark merged 1 commit intogoph:masterfrom
rumenvasilev:master

Conversation

@rumenvasilev
Copy link
Copy Markdown
Contributor

This should at least partially resolve #16.
The way this is supposed to work is:

  • introduce a new unknown list used in the case of a repo that doesn't have a license file
  • scanning a repo that doesn't have a license still generates the error message, but overall report is OK
  • in case the target repository changed the license, it will no longer match the filter introduced with the logic, meaning it will be reported as an error and the tool will exit with non-ok code, notifying us things changed

Previously these repositories would go under ignore, but then they will always be ignored and one would never know if the license changed.

Example configuration tested with opentf repository:

approved = [
  "apache-2.0",
  "bsd-2-clause",
  "bsd-3-clause",
  "isc",
  "mpl-2.0",
  "mit",
]

unknown = [
  "github.com/hashicorp/consul/api",
  "google.golang.org/protobuf"
]

Copy link
Copy Markdown
Contributor

@sagikazarmark sagikazarmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@sagikazarmark sagikazarmark merged commit 85e05ed into goph:master Sep 12, 2023
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.

Get notified about license changes when ignoring a package

2 participants