-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add a CI check ensuring the code has license headers #6609
Conversation
.github/workflows/check-licenses.yml
Outdated
npx @paritytech/license-scanner@0.0.3 scan \ | ||
--ensure-licenses Apache-2.0 \ | ||
--ensure-licenses GPL-3.0-only \ | ||
./**/src/**/*.rs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just ./**/*.rs
? I think having src
in there would make this not match on all files, e.g. build.rs
files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, I changed it to ./**/*.rs
(and added missing licenses uncovered by it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really cool! Just one question.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good and I see it is working!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💪
bot merge |
The scan looks for licenses in the source code and fails if some file does not have an Apache or GPL license header.
Scans files in the repo (so no dependencies). The scan could be extended to dependencies if needed.
Closes paritytech/license-scanner#20
Progresses paritytech/license-scanner#8