@@ -19,6 +19,7 @@ this issue: [#83](https://github.com/Lucas-C/pre-commit-hooks/issues/83)
19
19
- [ Handling years flexibly] ( #handling-years-flexibly )
20
20
- [ No extra EOL] ( #no-extra-eol )
21
21
- [ Fuzzy license matching] ( #fuzzy-license-matching )
22
+ - [ Multiple license files] ( #multiple-license-files )
22
23
- [ Handy shell functions] ( #handy-shell-functions )
23
24
- [ Useful local hooks] ( #useful-local-hooks )
24
25
- [ Forbid / remove some unicode characters] ( #forbid--remove-some-unicode-characters )
@@ -168,6 +169,23 @@ License insertion can be skipped altogether if the file contains the
168
169
` SKIP LICENSE INSERTION` in the first X top lines. This can also be
169
170
overridden by `--skip-license-insertion-comment=<COMMENT>` flag.
170
171
172
+ # ### Multiple license files
173
+
174
+ If more than one `--license-filepath` argument is specified, the checks are
175
+ performed as follows :
176
+
177
+ 1. First, an exact match is pursued, checking the 1st license file, then
178
+ the 2nd, and so on. If a match is found, the normal behavior is
179
+ followed, as if the matched license file was the only license file
180
+ specified.
181
+
182
+ 2. If no exact match is found, then the software resorts to fuzzy matching.
183
+ Again, as soon as a match is found, the normal behavior is followed, as
184
+ if the fuzzy-matched license file was the only license file specified.
185
+
186
+ 3. Finally, if neither exact nor fuzzy matches are found, the content of
187
+ the first license file is inserted.
188
+
171
189
# # Handy shell functions
172
190
173
191
` ` ` shell
0 commit comments