From 6a095587b5cbb1c5a308a375608dc57fe32105f5 Mon Sep 17 00:00:00 2001 From: Nathan Haim Date: Thu, 23 May 2024 15:53:55 +0200 Subject: [PATCH] add README.md --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..b693723 --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# rust-license + +`rust-license` is a tool inspired by [https://github.com/palantir/go-license](go-license).
+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):
+`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` \ No newline at end of file