Skip to content

rust tool to check, remove or apply license header to rust files

License

Notifications You must be signed in to change notification settings

najeal/rust-license

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust-license

rust-license is a tool inspired by go-license.
This tool ensures that a license header is applied to a list of files.

Install

cargo install rust-license

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):
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:
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):
rust-license license-header --config rust-license.yaml --remove your-first-file.txt your-second-file.rust

About

rust tool to check, remove or apply license header to rust files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages