.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "LICENSECHECK 1p" .TH LICENSECHECK 1p "2023-01-15" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" licensecheck \- simple license checker for source files .SH "VERSION" .IX Header "VERSION" Version v3.3.5 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& licensecheck [ \-\-help | \-\-version ] \& \& licensecheck [ \-\-list\-licenses | \-\-list\-naming\-schemes ] \& \& licensecheck [OPTION...] PATH [PATH...] .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBlicensecheck\fR 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. .PP If any of the arguments passed are directories, \&\fBlicensecheck\fR will add the files contained within to the list of files to process. .PP When multiple \fI\s-1PATH\s0\fRs are provided, only files matching \fB\-\-check\fR and not \fB\-\-ignore\fR are checked. .SH "OPTIONS" .IX Header "OPTIONS" .SS "Resolving patterns" .IX Subsection "Resolving patterns" .IP "\fB\-\-shortname\-scheme\fR" 16 .IX Item "--shortname-scheme" \&\fISince v3.2.\fR .Sp comma-separated priority list of license naming schemes to use for license identifiers (default value: unset (use verbose description)) .IP "\fB\-\-list\-licenses\fR" 16 .IX Item "--list-licenses" \&\fISince v3.2.\fR .Sp list identifiers for all detectable licenses and exit .IP "\fB\-\-list\-naming\-schemes\fR" 16 .IX Item "--list-naming-schemes" \&\fISince v3.2.\fR .Sp list all available license naming schemes and exit .SS "Selecting files" .IX Subsection "Selecting files" .IP "\fB\-c\fR \fI\s-1REGEX\s0\fR, \fB\-\-check\fR=\fI\s-1REGEX\s0\fR" 16 .IX Item "-c REGEX, --check=REGEX" \&\fISince v2.10.10.\fR .Sp regular expression of files to include when more than one \fI\s-1PATH\s0\fR is provided (default value: common source files) .IP "\fB\-i\fR \fI\s-1REGEX\s0\fR, \fB\-\-ignore\fR=\fI\s-1REGEX\s0\fR" 16 .IX Item "-i REGEX, --ignore=REGEX" \&\fISince v2.10.10.\fR .Sp regular expression of files to skip when more than one \fI\s-1PATH\s0\fR is provided (default value: some backup and VCS files) .IP "\fB\-r\fR, \fB\-\-recursive\fR" 16 .IX Item "-r, --recursive" \&\fISince v2.10.7.\fR .Sp traverse directories recursively .SS "Parsing contents" .IX Subsection "Parsing contents" .IP "\fB\-l\fR \fIN\fR, \fB\-\-lines\fR=\fIN\fR" 16 .IX Item "-l N, --lines=N" \&\fISince v2.10.3.\fR .Sp number of lines to parse from top of each file; implies optimistic search including only first cluster of detected copyrights or licenses; set to \fI0\fR to parse the whole file (and ignore \fB\-\-tail\fR) (default value: \fI60\fR) .IP "\fB\-\-tail\fR=\fIN\fR" 16 .IX Item "--tail=N" \&\fISince v2.15.10.\fR .Sp number of bytes to parse from bottom of each file when parsing only from top of each file and finding nothing there; set to 0 to avoid parsing from end of file (or set \fB\-\-lines\fR to \fI0\fR and ignore this setting) (default value: 5000 (roughly 60 lines)) .IP "\fB\-e\fR \fI\s-1CODEC\s0\fR, \fB\-\-encoding\fR=\fI\s-1CODEC\s0\fR" 16 .IX Item "-e CODEC, --encoding=CODEC" \&\fISince v2.15.10.\fR .Sp try decode source files from the specified codec, with \f(CW\*(C`iso\-8859\-1\*(C'\fR as fallback (default value: unset (no decoding)) .SS "Reporting results" .IX Subsection "Reporting results" .IP "\fB\-\-copyright\fR" 16 .IX Item "--copyright" \&\fISince v2.10.7.\fR .Sp add copyright statements to license information .IP "\fB\-s\fR, \fB\-\-skipped\fR" 16 .IX Item "-s, --skipped" \&\fISince v3.3.0.\fR .Sp Log files in \fI\s-1PATH\s0\fRs matching neither \fB\-\-check\fR nor \fB\-\-ignore\fR as warnings (default: log as debug) .IP "\fB\-m\fR, \fB\-\-machine\fR" 16 .IX Item "-m, --machine" \&\fISince v2.12.2.\fR .Sp print license information as \f(CW\*(C`TAB\*(C'\fR\-separated fields, for processing with line-oriented tools like \f(CW\*(C`awk\*(C'\fR and \f(CW\*(C`sort\*(C'\fR .IP "\fB\-\-[no\-]deb\-machine\fR" 16 .IX Item "--[no-]deb-machine" \&\fISince v3.0.0.\fR .Sp print license information like a Debian copyright file; implies \fB\-\-copyright\fR and \fB\-\-shortname\-scheme\fR=\fIdebian,spdx\fR .IP "\fB\-\-list\-delimiter\fR=\fI\s-1PRINTF\s0\fR" 16 .IX Item "--list-delimiter=PRINTF" \&\fISince v3.0.18.\fR .Sp printf-string used between multiple plain list items in Debian copyright file (default value: \fI'\en '\fR (NEWLINE SPACE)) .IP "\fB\-\-rfc822\-delimiter\fR=\fI\s-1PRINTF\s0\fR" 16 .IX Item "--rfc822-delimiter=PRINTF" \&\fISince v3.0.18.\fR .Sp printf-string used between multiple RFC822\-style items in Debian copyright file (default value: \fI'\en  '\fR (NEWLINE SPACE SPACE)) .IP "\fB\-\-copyright\-delimiter\fR=\fI\s-1PRINTF\s0\fR" 16 .IX Item "--copyright-delimiter=PRINTF" \&\fISince v3.0.19.\fR .Sp printf-string used between years and owners in Debian copyright file (default value: \fI', '\fR (COMMA SPACE)) .IP "\fB\-\-[no\-]merge\-licenses\fR" 16 .IX Item "--[no-]merge-licenses" \&\fISince v3.0.0.\fR .Sp merge same-licensed files in Debian copyright file .SS "General" .IX Subsection "General" .IP "\fB\-h\fR, \fB\-\-help\fR" 16 .IX Item "-h, --help" print help message and exit .IP "\fB\-v\fR, \fB\-\-version\fR" 16 .IX Item "-v, --version" print version and copyright information and exit .IP "\fB\-\-quiet\fR, \fB\-\-verbose\fR, \fB\-\-debug\fR, \fB\-\-trace\fR" 16 .IX Item "--quiet, --verbose, --debug, --trace" \&\fISince v3.3.0.\fR .Sp Emit only error messages to \s-1STDERR\s0 (with option \fB\-\-quiet\fR), or (in addition errors and warnings) also notices/debug/traces. The more \*(L"noisy\*(R" option wins if several are set. (default: emit errors and warnings .SH "ENVIRONMENT" .IX Header "ENVIRONMENT" .IP "\s-1NO_COLOR\s0" 6 .IX Item "NO_COLOR" If defined, will disable color. Consulted before \s-1COLOR.\s0 .IP "\s-1COLOR\s0" 6 .IX Item "COLOR" Can be set to 0 to explicitly disable colors. The default is to use color when connected to a terminal. .IP "\s-1LOG_LEVEL\s0 =item \s-1QUIET\s0 =item \s-1VERBOSE\s0 =item \s-1DEBUG\s0 =item \s-1TRACE\s0" 6 .IX Item "LOG_LEVEL =item QUIET =item VERBOSE =item DEBUG =item TRACE" Used to emit varying details about discoveries to \s-1STDERR\s0 when verbosity is not set using either of options \fB\-\-quiet\fR, \fB\-\-verbose\fR, \fB\-\-debug\fR or \fB\-\-trace\fR. See Log::Any::Adapter::Screen for more details. .IP "\s-1LOG_PREFIX\s0" 6 .IX Item "LOG_PREFIX" The default formatter groks these variables. See \fBformatter\fR in Log::Any::Adapter::Screen for more details. .SH "CAVEATS" .IX Header "CAVEATS" 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 \fB\-\-shortname\-scheme\fR. .PP Option \fB\-\-deb\-fmt\fR was deprecated since v3.2. Please use option \fB\-\-shortname\-scheme\fR=\fIdebian,spdx\fR instead. .SH "SEE ALSO" .IX Header "SEE ALSO" Other similar tools exist. .PP Here is a list of known tools also command-line based and general-purpose: .IP "copyright-update " 16 .IX Item "copyright-update " Written in Perl. .IP "debmake " 16 .IX Item "debmake " Written in Python. .Sp Specific to Debian packages. .IP "decopy " 16 .IX Item "decopy " Written in Python. .IP "Licensee " 16 .IX Item "Licensee " Written in Ruby. .IP "LicenseFinder " 16 .IX Item "LicenseFinder " Written in Ruby. .IP "ninka " 16 .IX Item "ninka " Written in \*(C+. .Sp Used in FOSSology (along with Monk and Nomos apparently unavailable as standalone command-line tools). .IP "ripper " 16 .IX Item "ripper " Written in Go. .IP "scancode-toolkit " 16 .IX Item "scancode-toolkit " Written in Python. .SH "AUTHOR" .IX Header "AUTHOR" Jonas Smedegaard \f(CW\*(C`\*(C'\fR .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This program is based on the script \*(L"licensecheck\*(R" from the \s-1KDE SDK,\s0 originally introduced by Stefan Westerfeld \f(CW\*(C`\*(C'\fR. .PP .Vb 1 \& Copyright © 2007, 2008 Adam D. Barratt \& \& Copyright © 2012 Francesco Poli \& \& Copyright © 2016\-2022 Jonas Smedegaard \& \& Copyright © 2017\-2022 Purism SPC .Ve .PP This program is free software: you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 Affero General Public License as published by the Free Software Foundation, either version 3, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, but \s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the \s-1GNU\s0 Affero General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 Affero General Public License along with this program. If not, see .