commit | cbb2a6a7d17adae2a3ec23696990da9bf74b92bb | [log] [tgz] |
---|---|---|
author | Hoshea <fgksgf@gmail.com> | Mon Nov 23 20:21:31 2020 +0800 |
committer | Hoshea <fgksgf@gmail.com> | Mon Nov 23 20:21:31 2020 +0800 |
tree | 55b21364c03e76f7a8762534c2d916279cfe47a2 | |
parent | 3938361f335ae063bbcb4910e850cf1bfafff5b7 [diff] |
Update doc
A CLI tool for checking license headers, which theoretically supports checking all types of files.
git clone https://github.com/fgksgf/license-checker.git cd license-checker make
Usage: license-checker [flags] license-checker walks the specified path recursively and checks if the specified files have the license header in the config file. Usage: license-checker [flags] Flags: -c, --config string the config file (default ".licenserc.json") -h, --help help for license-checker -l, --loose loose mode -p, --path string the path to check (default ".") -v, --verbose verbose mode
{ // What to check in strict mode, the order of strings can NOT be changed arbitrarily "licenseStrict": [ "Licensed to the Apache Software Foundation (ASF) under one or more", "contributor license agreements. See the NOTICE file distributed with", "..." ], // What to check in loose mode, the order of strings can NOT be changed arbitrarily "licenseLoose": [ "Apache License, Version 2.0" ], // license-checker will check *.java and *.go "targetFiles": [ "java", "go" ], "exclude": { // license-checker will NOT check these files "files": [ ".gitignore", "NOTICE", "LICENSE" ], // license-checker will NOT check files whose names with these extensions "extensions": [ "md", "xml", "json" ], // license-checker will NOT check these directories "directories": [ "bin", ".github" ] } }
bin/license-checker -p test -c test/.licenserc_for_test.json