commit | 3938d041bae1278c9ca8b693348cfa68f3aef7d6 | [log] [tgz] |
---|---|---|
author | Hoshea <fgksgf@gmail.com> | Mon Nov 23 20:11:41 2020 +0800 |
committer | Hoshea <fgksgf@gmail.com> | Mon Nov 23 20:11:41 2020 +0800 |
tree | b2806ac508c296aecbda7f5770077582cc625688 | |
parent | 42ecc96dae3c76f19346d40471b5efc4c190be3d [diff] |
dev
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
{ "licenseStrict": [ "Licensed to the Apache Software Foundation (ASF) under one or more", "contributor license agreements. See the NOTICE file distributed with", "..." ], "licenseLoose": [ "Apache License, Version 2.0" ], "targetFiles": [ "java", "go", "py", "sh", "graphql", "yaml", "yml" ], "exclude": { "files": [ ".gitignore", "NOTICE", "go.mod", "go.sum", ".DS_Store", "LICENSE" ], "extensions": [ "md", "xml", "json" ], "directories": [ "bin", ".github", ".git", ".idea", "test" ] } }
bin/license-checker -p test -c test/.licenserc_for_test.json