A set of configuration files for pre-commit-license-check
This repository has been archived on 2022-01-12. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Franco Masotti 7564417a23
2021-07-10 00:48:50 +02:00
.github/workflows initial repo creation 2021-06-07 16:32:00 +02:00
categories Fixes. 2021-07-10 00:48:50 +02:00
.gitignore Added gitignore. 2021-07-09 23:03:26 +02:00
.pre-commit-config.yaml Updated hooks. 2021-07-09 23:06:02 +02:00
.python-version initial repo creation 2021-06-07 16:32:00 +02:00
Makefile Fixes. 2021-07-09 23:00:48 +02:00
Pipfile Fixes. 2021-07-09 23:00:48 +02:00
README.md Fixed overview description. 2021-07-09 23:17:07 +02:00




Checking the licenses of your open source dependencies is important. But the necessary collection is something that you don't want to do again for each project.

To simplify this, codecentric collects a central list of licenses that can be used for specific purposes. This list is provided as an external configuration file for kontrolilo which can be used by pre-commit.

This repository does not contain any legal advice which licenses can be used for which purposes. Please check the list before using it. You have been warned.


Setup pre-commit

To use this make sure, you have pre-commit installed.

When setting a new project, create a new file called .pre-commit-config.yaml that contains at least the following hooks:

  - repo: https://github.com/nbyl/pre-commit-license-checks
    rev: v1.3.1
      - id: license-check-npm
      - id: license-check-pipenv

Afterwards, you can setup your local git hooks using:

pre-commit install

From now on, alle your git commits will be checked locally with the configured hooks.

Setup license list

To use the external license list, create a file .license-check.yaml next to your package manager file:

- url: https://raw.githubusercontent.com/nbyl/license-check-config/main/categories/$CATEGORY/$FILE

Replace $CATEGORY with a license category according to this table:

$FILE Description
proprietary-use All licenses that can be used without restrictions even within proprietary products (e.g. BSD, Apache, ...)
open-source Licenses that are suitable for open source development.
gnu-gpl-compatible License compatible with the GNU GPL according to the official list

Replace $FILE with the file for your supported package manager according to this table:

Package Manager Package Manager File $FILE
npm package.json license-check-npm.yaml
pipenv Pipfile license-check-python.yaml


If you want to update the list of allowed licenses, please edit the corresponding configuration file and submit a pull request.