addlicense

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

README


Addlicense

Add any license header on all files.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Install
  3. Usage
  4. 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.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL