Crates.io | rust-license |
lib.rs | rust-license |
version | 0.1.0 |
source | src |
created_at | 2024-05-23 14:02:54.332876 |
updated_at | 2024-05-23 14:02:54.332876 |
description | rust tool to check, remove or apply license header to rust files |
homepage | https://github.com/najeal/rust-license |
repository | https://github.com/najeal/rust-license |
max_upload_size | |
id | 1249519 |
size | 40,562 |
rust-license
is a tool inspired by https://github.com/palantir/go-license.
This tool ensures that a license header is applied to a list of files.
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.
using the tool you can apply this license to your files (with --apply
flag):
rust-license license-header --config rust-license.yaml --apply your-first-file.txt your-second-file.rust
you can check the license is in your files (with --check
flag), the tool will print the paths of files not containing the header:
rust-license license-header --config rust-license.yaml --check your-first-file.txt your-second-file.rust
you can delete the license from your files (with --remove
flag):
rust-license license-header --config rust-license.yaml --remove your-first-file.txt your-second-file.rust