-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# rust-license | ||
|
||
`rust-license` is a tool inspired by [https://github.com/palantir/go-license](go-license).<br> | ||
This tool ensures that a license header is applied to a list of files. | ||
|
||
# Usage | ||
|
||
Create a yaml config file `rust-license.yaml` containing the headers you want to apply in your project | ||
|
||
``` | ||
headers: | | ||
// Copyright (c) 2024 najeal, All rights reserved. | ||
// See the file LICENSE for licensing terms. | ||
``` | ||
|
||
## Apply headers | ||
using the tool you can apply this license to your files (with `--apply` flag):<br> | ||
`rust-license license-header --config rust-license.yaml --apply your-first-file.txt your-second-file.rust` | ||
|
||
## Check headers | ||
you can check the license is in your files (with `--check` flag), the tool will print the paths of files not containing the header:<br> | ||
`rust-license license-header --config rust-license.yaml --check your-first-file.txt your-second-file.rust` | ||
|
||
## Remove headers | ||
you can delete the license from your files (with `--remove` flag):<br> | ||
`rust-license license-header --config rust-license.yaml --remove your-first-file.txt your-second-file.rust` |