Skip to content

Commit f8b8caf

Browse files
author
Olivier Chédru
authored
Merge pull request #94 from Thomzoy/master
feat: allow regex matching
2 parents 9c1fcb7 + 8c0cf62 commit f8b8caf

File tree

3 files changed

+316
-155
lines changed

3 files changed

+316
-155
lines changed

README.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,20 @@ Also supports pyproject.toml like:
194194
[tool.liccheck.authorized_packages]
195195
uuid = 1.30
196196

197+
By default, exact matching is required between each package's license and one of the license of the authorized or unauthorized list.
198+
You can also provide regular expressions to match licenses by using the ``as_regex`` boolean flag. For instance, to exclude GPL licenses,
199+
one could define the following configuration in ``pyproject.toml``:
200+
201+
::
202+
203+
...
204+
205+
unauthorized_licenses = [
206+
'\bgpl'
207+
]
208+
as_regex = true
209+
210+
197211
Using liccheck with pre-commit
198212
==============================
199213

0 commit comments

Comments
 (0)