fastify / workflows

Reusable workflows for use in the Fastify organization
MIT License
10 stars 7 forks source link

Cut down license checking output #62

Closed Fdawgs closed 2 years ago

Fdawgs commented 2 years ago

Prerequisites

Issue

License checking output is quite verbose atm, for example:

https://github.com/fastify/fastify-helmet/runs/7727727775?check_suite_focus=true

The output is:

├─ @fastify/helmet@9.1.0
│  ├─ licenses: MIT
│  ├─ repository: https://github.com/fastify/fastify-helmet
│  ├─ publisher: Matteo Collina
│  ├─ email: hello@matteocollina.com
│  ├─ path: /home/runner/work/fastify-helmet/fastify-helmet
│  └─ licenseFile: /home/runner/work/fastify-helmet/fastify-helmet/LICENSE
├─ fastify-plugin@4.1.0
│  ├─ licenses: MIT
│  ├─ repository: https://github.com/fastify/fastify-plugin
│  ├─ publisher: Tomas Della Vedova - @delvedor
│  ├─ url: http://delved.org/
│  ├─ path: /home/runner/work/fastify-helmet/fastify-helmet/node_modules/fastify-plugin
│  └─ licenseFile: /home/runner/work/fastify-helmet/fastify-helmet/node_modules/fastify-plugin/LICENSE
└─ helmet@5.1.1
   ├─ licenses: MIT
   ├─ repository: https://github.com/helmetjs/helmet
   ├─ publisher: Adam Baldwin
   ├─ email: adam@npmjs.com
   ├─ url: https://evilpacket.net/
   ├─ path: /home/runner/work/fastify-helmet/fastify-helmet/node_modules/helmet
   └─ licenseFile: /home/runner/work/fastify-helmet/fastify-helmet/node_modules/helmet/LICENSE

Obviously @fastify/helmet is one of the smaller plugins, this is a lot longer for something like @fastify/swagger or @fastify/static.

If we add the --summary option to license-checker then it'd cut it down to:

└─ MIT: 2

It still throws errors even with this option enabled, so we'll still catch unacceptable licenses, we just won't have to scroll through the long output to get to it.

climba03003 commented 2 years ago

Can you show the result of error when --summary is used?

Fdawgs commented 2 years ago

Can you show the result of error when --summary is used?

Sure, it's the same as if not using --summary, as an example from fastify-nextjs:

Package "caniuse-lite@1.0.30001373" is licensed under "CC-BY-4.0" which is not permitted by the --onlyAllow flag. Exiting.

Uzlopak commented 2 years ago

Yes, use the less verbose one.

github-actions[bot] commented 2 years ago

🎉 This issue has been resolved in version 3.6.0 🎉

The release is available on: