diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4335f5338..0723fc7db 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -53,10 +53,18 @@ repos: language: script # exclude: we could exclude files here, but we do it in the script instead -- repo: local +#- repo: local +# hooks: +# - id: check-commit-msg +# name: Check commit message +# entry: python scripts/dev/check-commit-msg.py +# language: python +# stages: [commit-msg] + +- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook + rev: v9.5.0 hooks: - - id: check-commit-msg - name: Check commit message - entry: python scripts/dev/check-commit-msg.py - language: python + - id: commitlint + name: Check commit message with commitlint stages: [commit-msg] + additional_dependencies: ['@commitlint/config-conventional'] diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 000000000..d7dd88b88 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,10 @@ +/* This file is part of the DiscoPoP software (http://www.discopop.tu-darmstadt.de) + * + * Copyright (c) 2020, Technische Universitaet Darmstadt, Germany + * + * This software may be modified and distributed under the terms of + * the 3-Clause BSD License. See the LICENSE file in the package base + * directory for details. + */ + +module.exports = { extends: ['@commitlint/config-conventional'] };