Write a shell script to validate licensing #24
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: canary/canary-rs#24
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Every Rust source file in Canary needs to be licensed. A shell script that could check all the source files could help enforce licensing of the entire source tree. Licenses are at the top of source files and look like this:
Canary has different licenses for different crates, so the header will not be identical between all source files.
The script needs to find all Rust source files in the repository (staged, committed, or still unstaged) that are not ignored by Git, validate that they have a well-formed license header, and then display the list of files that do not have a valid header. The script should return with an error if it finds any invalid headers. It only needs to run on Linux, and can use non-standard programs, however, a list of all non-standard dependencies must be provided in a comment at the beginning of the script. Bash shell features are not allowed; please test with dash instead.
The script should be placed in the repository root as
check_licenses.sh
and given proper Unix file permissions.