1LICENSECHECK(1) User Contributed Perl Documentation LICENSECHECK(1)
2
3
4
6 licensecheck - simple license checker for source files
7
9 Version v3.2.12
10
12 licensecheck [ --help | --version ]
13
14 licensecheck [ --list-licenses | --list-naming-schemes ]
15
16 licensecheck [OPTION...] PATH [PATH...]
17
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
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; set
77 to 0 to avoid parsing from end of file
78 (default value: 5000 (roughly 60 lines))
79
80 -e CODEC, --encoding=CODEC
81 Since v2.15.10.
82
83 try decode source files from the specified codec, with
84 "iso-8859-1" as fallback
85 (default value: unset (no decoding))
86
87 Reporting results
88 --[no-]verbose Since v2.10.3.
89
90 add header of each file to license information
91
92 --copyright Since v2.10.7.
93
94 add copyright statements to license information
95
96 -s, --skipped Since v2.15.10.
97
98 print to STDERR files in PATHs matching neither --check
99 nor --ignore
100
101 -m, --machine Since v2.12.2.
102
103 print license information as "TAB"-separated fields,
104 for processing with line-oriented tools like "awk" and
105 "sort" (NB! --verbose will kill readability)
106
107 --[no-]deb-machine
108 Since v3.0.0.
109
110 print license information like a Debian copyright file;
111 implies --copyright and --shortname-scheme=debian,spdx
112
113 --list-delimiter=PRINTF
114 Since v3.0.18.
115
116 printf-string used between multiple plain list items in
117 Debian copyright file
118 (default value: '\n ' (NEWLINE SPACE))
119
120 --rfc822-delimiter=PRINTF
121 Since v3.0.18.
122
123 printf-string used between multiple RFC822-style items
124 in Debian copyright file
125 (default value: '\n ' (NEWLINE SPACE SPACE))
126
127 --copyright-delimiter=PRINTF
128 Since v3.0.19.
129
130 printf-string used between years and owners in Debian
131 copyright file (default value: ', ' (COMMA SPACE))
132
133 --[no-]merge-licenses
134 Since v3.0.0.
135
136 merge same-licensed files in Debian copyright file
137
138 General
139 -h, --help print help message and exit
140
141 -v, --version print version and copyright information and exit
142
144 NO_COLOR
145 If defined, will disable color. Consulted before COLOR.
146
147 COLOR Can be set to 0 to explicitly disable colors. The default is to
148 use color when connected to a terminal.
149
150 LOG_LEVEL =item QUIET =item VERBOSE =item DEBUG =item TRACE
151 Used to emit varying details about discoveries to STDERR. See
152 Log::Any::Adapter::Screen for more details.
153
154 LOG_PREFIX
155 The default formatter groks these variables. See formatter in
156 Log::Any::Adapter::Screen for more details.
157
159 The exact output may change between releases, due to the inherently
160 fragile scanning of unstructured data, and the ongoing improvements to
161 detection patterns. For some level of stability, use one of the
162 machine-readable output formats and define a --shortname-scheme.
163
164 Option --deb-fmt was deprecated since v3.2. Please use option
165 --shortname-scheme=debian,spdx instead.
166
168 Other similar tools exist.
169
170 Here is a list of known tools also command-line based and general-
171 purpose:
172
173 copyright-update <https://github.com/jaalto/project--copyright-update>
174 Written in Perl.
175
176 debmake <http://anonscm.debian.org/git/collab-maint/debmake.git>
177 Written in Python.
178
179 Specific to Debian packages.
180
181 decopy <https://anonscm.debian.org/git/collab-maint/decopy.git>
182 Written in Python.
183
184 Licensee <http://ben.balter.com/licensee/>
185 Written in Ruby.
186
187 LicenseFinder <https://github.com/pivotal/LicenseFinder>
188 Written in Ruby.
189
190 ninka <http://ninka.turingmachine.org/>
191 Written in C++.
192
193 Used in FOSSology <http://fossology.org/> (along with
194 Monk and Nomos apparently unavailable as standalone
195 command-line tools).
196
197 ripper <https://github.com/odeke-em/ripper>
198 Written in Go.
199
200 scancode-toolkit <https://github.com/nexB/scancode-toolkit>
201 Written in Python.
202
204 Jonas Smedegaard "<dr@jones.dk>"
205
207 This program is based on the script "licensecheck" from the KDE SDK,
208 originally introduced by Stefan Westerfeld "<stefan@space.twc.de>".
209
210 Copyright © 2007, 2008 Adam D. Barratt
211
212 Copyright © 2012 Francesco Poli
213
214 Copyright © 2016-2021 Jonas Smedegaard
215
216 Copyright © 2017-2021 Purism SPC
217
218 This program is free software: you can redistribute it and/or modify it
219 under the terms of the GNU Affero General Public License as published
220 by the Free Software Foundation, either version 3, or (at your option)
221 any later version.
222
223 This program is distributed in the hope that it will be useful, but
224 WITHOUT ANY WARRANTY; without even the implied warranty of
225 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
226 Affero General Public License for more details.
227
228 You should have received a copy of the GNU Affero General Public
229 License along with this program. If not, see
230 <https://www.gnu.org/licenses/>.
231
232
233
234perl v5.34.0 2021-08-30 LICENSECHECK(1)