licensecheck - simple license checker for source files
Version v3.2.5
licensecheck --help|--version
licensecheck --list-licenses|--list-naming-schemes
licensecheck [options...] PATH [PATH...]
licensecheck attempts to determine the license that applies to each file passed to it, by searching the start of the file for text belonging to various licenses.
If any of the arguments passed are directories, licensecheck will add the files contained within to the list of files to process.
When multiple PATHs are provided, only files matching --check and not --ignore are checked.
Since v3.2.
comma-separated priority list of license naming schemes to use for license identifiers (default value: unset (use verbose description))
list identifiers for all detectable licenses and exit
list all available license naming schemes and exit
Since v2.10.10.
regular expression of files to include when more than one PATH is provided (default value: common source files)
regular expression of files to skip when more than one PATH is provided (default value: some backup and VCS files)
Since v2.10.7.
traverse directories recursively
Since v2.10.3.
number of lines to parse from top of each file; implies optimistic search including only first cluster of detected copyrights or licenses; set to 0 to parse the whole file (and ignore --tail) (default value: 60)
Since v2.15.10.
number of bytes to parse from bottom of each file; set to 0 to avoid parsing from end of file (default value: 5000 (roughly 60 lines))
try decode source files from the specified codec, with iso-8859-1 as fallback (default value: unset (no decoding))
iso-8859-1
add header of each file to license information
add copyright statements to license information
print to STDERR files in PATHs matching neither --check nor --ignore
Since v2.12.2.
print license information as TAB-separated fields, for processing with line-oriented tools like awk and sort (NB! --verbose will kill readability)
TAB
awk
sort
Since v3.0.0.
print license information like a Debian copyright file; implies --copyright and --shortname-scheme=debian,spdx
Since v3.0.18.
printf-string used between multiple plain list items in Debian copyright file (default value: '\n ' (NEWLINE SPACE))
printf-string used between multiple RFC822-style items in Debian copyright file (default value: '\n ' (NEWLINE SPACE SPACE))
Since v3.0.19.
printf-string used between years and owners in Debian copyright file (default value: ', ' (COMMA SPACE))
merge same-licensed files in Debian copyright file
print help message and exit
print version and copyright information and exit
If defined, will disable color. Consulted before COLOR.
Can be set to 0 to explicitly disable colors. The default is to use color when connected to a terminal.
Used to emit varying details about discoveries to STDERR. See Log::Any::Adapter::Screen for more details.
The default formatter groks these variables. See formatter in Log::Any::Adapter::Screen for more details.
The exact output may change between releases, due to the inherently fragile scanning of unstructured data, and the ongoing improvements to detection patterns. For some level of stability, use one of the machine-readable output formats and define a --shortname-scheme.
Option --deb-fmt was deprecated since v3.2. Please use option --shortname-scheme=debian,spdx instead.
Other similar tools exist.
Here is a list of known tools also command-line based and general-purpose:
Written in Perl.
Written in Python.
Specific to Debian packages.
)item Licensee
Written in Ruby.
Written in C++.
Used in FOSSology (along with Monk and Nomos apparently unavailable as standalone command-line tools).
Written in Go.
Jonas Smedegaard <dr@jones.dk>
<dr@jones.dk>
This program is based on the script "licensecheck" from the KDE SDK, originally introduced by Stefan Westerfeld <stefan@space.twc.de>.
<stefan@space.twc.de>
Copyright © 2007, 2008 Adam D. Barratt Copyright © 2012 Francesco Poli Copyright © 2016-2020 Jonas Smedegaard Copyright © 2017-2020 Purism SPC
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
3 POD Errors
The following errors were encountered while parsing the POD:
Unterminated S<...> sequence
To install App::Licensecheck, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Licensecheck
CPAN shell
perl -MCPAN -e shell install App::Licensecheck
For more information on module installation, please visit the detailed CPAN module installation guide.