Addlicense
Add any license header on all files.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
-
About The Project
- Install
- Usage
- License
About The Project
The program ensures source code files have copyright license headers
by scanning directory patterns recursively.
It modifies all source files in place and avoids adding a license header
to any file that already has one.
This project is an fork from 'addlicense' by Google Inc with GNU support.
Install
go get -u github.com/ichigoproject/addlicense
Usage
addlicense [flags] pattern [pattern ...]
-c copyright holder (defaults to "Ichigo Project")
-f custom license file (no default)
-l license type: apache, bsd, mit, mpl, gnu (defaults to "gnu")
-y year (defaults to current year)
-check check only mode: verify presence of license headers and exit with non-zero code if missing
The pattern argument can be provided multiple times, and may also refer
to single files.
Example
Add "apache" license header on all files.
addlicense -l apache -c "My company" apache path/to/your/code/
Check if headers is present or not (in current directory):
addlicense -check .
License
Distributed under the Apache 2.0 license. See LICENSE for more information.