licensee icon indicating copy to clipboard operation
licensee copied to clipboard

Ergonomics: display the errors as Kotlin configuration code?

Open martinbonnin opened this issue 1 year ago • 1 comments

Currently if licensee fails, I get an error like this:

 - ERROR: SPDX identifier 'Apache-2.0' is NOT allowed
 - ERROR: SPDX identifier 'Apache-2.0' is NOT allowed
 - ERROR: SPDX identifier 'Apache-2.0' is NOT allowed
 - ERROR: SPDX identifier 'Apache-2.0' is NOT allowed
 - ERROR: SPDX identifier 'Apache-2.0' is NOT allowed
 - ERROR: SPDX identifier 'Apache-2.0' is NOT allowed
 - ERROR: SPDX identifier 'Apache-2.0' is NOT allowed
 - ERROR: Unknown license URL 'http://www.eclipse.org/org/documents/edl-v10.php' is NOT allowed
 - ERROR: Unknown license URL 'http://www.eclipse.org/org/documents/edl-v10.php' is NOT allowed
 - ERROR: SPDX identifier 'Apache-2.0' is NOT allowed
 - ERROR: Unknown license URL 'https://www.bouncycastle.org/licence.html' is NOT allowed
 - ERROR: Unknown license URL 'https://www.bouncycastle.org/licence.html' is NOT allowed
 - ...

Would it be possible/desirable to display it as plain Kotlin that I can copy/pasta (and possibly edit) in my buildscript?

licensee {
  allow("Apache-2.0")

  allowUrl("http://www.eclipse.org/org/documents/edl-v10.php")
  allowUrl("https://www.bouncycastle.org/licence.html")
}

Would make the task of onboarding licensee easier.

martinbonnin avatar Nov 08 '24 15:11 martinbonnin

De-duplicating the exceptions to the allow-list would be a good first step toward this.

JakeWharton avatar Jan 10 '25 16:01 JakeWharton