1LICENSECHECK(1)       User Contributed Perl Documentation      LICENSECHECK(1)
2
3
4

NAME

6       licensecheck - simple license checker for source files
7

VERSION

9       Version v3.3.0
10

SYNOPSIS

12           licensecheck [ --help | --version ]
13
14           licensecheck [ --list-licenses | --list-naming-schemes ]
15
16           licensecheck [OPTION...] PATH [PATH...]
17

DESCRIPTION

19       licensecheck attempts to determine the license that applies to each
20       file passed to it, by searching the start of the file for text
21       belonging to various licenses.
22
23       If any of the arguments passed are directories, licensecheck will add
24       the files contained within to the list of files to process.
25
26       When multiple PATHs are provided, only files matching --check and not
27       --ignore are checked.
28

OPTIONS

30   Resolving patterns
31       --shortname-scheme
32                       Since v3.2.
33
34                       comma-separated priority list of license naming schemes
35                       to use for license identifiers
36                       (default value: unset (use verbose description))
37
38       --list-licenses Since v3.2.
39
40                       list identifiers for all detectable licenses and exit
41
42       --list-naming-schemes
43                       Since v3.2.
44
45                       list all available license naming schemes and exit
46
47   Selecting files
48       -c REGEX, --check=REGEX
49                       Since v2.10.10.
50
51                       regular expression of files to include when more than
52                       one PATH is provided
53                       (default value: common source files)
54
55       -i REGEX, --ignore=REGEX
56                       Since v2.10.10.
57
58                       regular expression of files to skip when more than one
59                       PATH is provided
60                       (default value: some backup and VCS files)
61
62       -r, --recursive Since v2.10.7.
63
64                       traverse directories recursively
65
66   Parsing contents
67       -l N, --lines=N Since v2.10.3.
68
69                       number of lines to parse from top of each file; implies
70                       optimistic search including only first cluster of
71                       detected copyrights or licenses; set to 0 to parse the
72                       whole file (and ignore --tail) (default value: 60)
73
74       --tail=N        Since v2.15.10.
75
76                       number of bytes to parse from bottom of each file when
77                       parsing only from top of each file and finding nothing
78                       there; set to 0 to avoid parsing from end of file (or
79                       set --lines to 0 and ignore this setting)
80                       (default value: 5000 (roughly 60 lines))
81
82       -e CODEC, --encoding=CODEC
83                       Since v2.15.10.
84
85                       try decode source files from the specified codec, with
86                       "iso-8859-1" as fallback
87                       (default value: unset (no decoding))
88
89   Reporting results
90       --copyright     Since v2.10.7.
91
92                       add copyright statements to license information
93
94       -s, --skipped   Since v3.3.0.
95
96                       Log files in PATHs matching neither --check nor
97                       --ignore as warnings (default: log as debug)
98
99       -m, --machine   Since v2.12.2.
100
101                       print license information as "TAB"-separated fields,
102                       for processing with line-oriented tools like "awk" and
103                       "sort"
104
105       --[no-]deb-machine
106                       Since v3.0.0.
107
108                       print license information like a Debian copyright file;
109                       implies --copyright and --shortname-scheme=debian,spdx
110
111       --list-delimiter=PRINTF
112                       Since v3.0.18.
113
114                       printf-string used between multiple plain list items in
115                       Debian copyright file
116                       (default value: '\n ' (NEWLINE SPACE))
117
118       --rfc822-delimiter=PRINTF
119                       Since v3.0.18.
120
121                       printf-string used between multiple RFC822-style items
122                       in Debian copyright file
123                       (default value: '\n  ' (NEWLINE SPACE SPACE))
124
125       --copyright-delimiter=PRINTF
126                       Since v3.0.19.
127
128                       printf-string used between years and owners in Debian
129                       copyright file (default value: ', ' (COMMA SPACE))
130
131       --[no-]merge-licenses
132                       Since v3.0.0.
133
134                       merge same-licensed files in Debian copyright file
135
136   General
137       -h, --help      print help message and exit
138
139       -v, --version   print version and copyright information and exit
140
141       --quiet, --verbose, --debug, --trace
142                       Since v3.3.0.
143
144                       Emit only error messages to STDERR (with option
145                       --quiet), or (in addition errors and warnings) also
146                       notices/debug/traces.  The more "noisy" option wins if
147                       several are set.  (default: emit errors and warnings
148

ENVIRONMENT

150       NO_COLOR
151             If defined, will disable color.  Consulted before COLOR.
152
153       COLOR Can be set to 0 to explicitly disable colors.  The default is to
154             use color when connected to a terminal.
155
156       LOG_LEVEL =item QUIET =item VERBOSE =item DEBUG =item TRACE
157             Used to emit varying details about discoveries to STDERR when
158             verbosity is not set using either of options --quiet, --verbose,
159             --debug or --trace.  See Log::Any::Adapter::Screen for more
160             details.
161
162       LOG_PREFIX
163             The default formatter groks these variables.  See formatter in
164             Log::Any::Adapter::Screen for more details.
165

CAVEATS

167       The exact output may change between releases, due to the inherently
168       fragile scanning of unstructured data, and the ongoing improvements to
169       detection patterns.  For some level of stability, use one of the
170       machine-readable output formats and define a --shortname-scheme.
171
172       Option --deb-fmt was deprecated since v3.2.  Please use option
173       --shortname-scheme=debian,spdx instead.
174

SEE ALSO

176       Other similar tools exist.
177
178       Here is a list of known tools also command-line based and general-
179       purpose:
180
181       copyright-update <https://github.com/jaalto/project--copyright-update>
182                       Written in Perl.
183
184       debmake <http://anonscm.debian.org/git/collab-maint/debmake.git>
185                       Written in Python.
186
187                       Specific to Debian packages.
188
189       decopy <https://anonscm.debian.org/git/collab-maint/decopy.git>
190                       Written in Python.
191
192       Licensee <http://ben.balter.com/licensee/>
193                       Written in Ruby.
194
195       LicenseFinder <https://github.com/pivotal/LicenseFinder>
196                       Written in Ruby.
197
198       ninka <http://ninka.turingmachine.org/>
199                       Written in C++.
200
201                       Used in FOSSology <http://fossology.org/> (along with
202                       Monk and Nomos apparently unavailable as standalone
203                       command-line tools).
204
205       ripper <https://github.com/odeke-em/ripper>
206                       Written in Go.
207
208       scancode-toolkit <https://github.com/nexB/scancode-toolkit>
209                       Written in Python.
210

AUTHOR

212       Jonas Smedegaard "<dr@jones.dk>"
213
215       This program is based on the script "licensecheck" from the KDE SDK,
216       originally introduced by Stefan Westerfeld "<stefan@space.twc.de>".
217
218         Copyright © 2007, 2008 Adam D. Barratt
219
220         Copyright © 2012 Francesco Poli
221
222         Copyright © 2016-2021 Jonas Smedegaard
223
224         Copyright © 2017-2021 Purism SPC
225
226       This program is free software: you can redistribute it and/or modify it
227       under the terms of the GNU Affero General Public License as published
228       by the Free Software Foundation, either version 3, or (at your option)
229       any later version.
230
231       This program is distributed in the hope that it will be useful, but
232       WITHOUT ANY WARRANTY; without even the implied warranty of
233       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
234       Affero General Public License for more details.
235
236       You should have received a copy of the GNU Affero General Public
237       License along with this program.  If not, see
238       <https://www.gnu.org/licenses/>.
239
240
241
242perl v5.36.0                      2022-07-21                   LICENSECHECK(1)
Impressum