forked from machinekit/machinekit-hal
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEATURE: Add the configuration for git hooks
Implementation of the basic configuration for the Python based multi-language supporting git hooks manager 'pre-commit' (https://pre-commit.com, https://github.com/pre-commit/pre-commit) by using hooks (actions, rules) from the common repository 'https://github.com/pre-commit/pre-commit-hooks' maintained by the very same organization. This will make sure that the most common and generic programming mistakes and formatting issues will no longer be present in the Machinekit-HAL repository (but it is still a bit Python centric). The Lefthook configuration file which was added by mistake as part of CMake rework was removed as it will not be used.
- Loading branch information
Showing
2 changed files
with
59 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# #################################################################### | ||
# Description: .pre-commit-config.yaml | ||
# | ||
# This file, '.pre-commit-config.yaml', implements | ||
# the configuration rules for the Pre-Commit git hook manager | ||
# for Machinekit-HAL project | ||
# | ||
# Copyright (C) 2022 Jakub Fišer <jakub DOT fiser AT eryaf DOT com> | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU Lesser General Public | ||
# License as published by the Free Software Foundation; either | ||
# version 2.1 of the License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
# Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public | ||
# License along with this library; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
# | ||
# ##################################################################### | ||
|
||
exclude: ^attic/.* | ||
default_stages: | ||
- commit | ||
- push | ||
repos: | ||
- repo: 'https://github.com/pre-commit/pre-commit-hooks' | ||
rev: v4.1.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-ast | ||
- id: check-case-conflict | ||
- id: check-executables-have-shebangs | ||
- id: check-json | ||
- id: check-merge-conflict | ||
- id: check-shebang-scripts-are-executable | ||
- id: check-symlinks | ||
- id: check-toml | ||
- id: check-vcs-permalinks | ||
- id: check-xml | ||
- id: check-yaml | ||
args: | ||
- '--allow-multiple-documents' | ||
- id: destroyed-symlinks | ||
- id: end-of-file-fixer | ||
- id: fix-byte-order-marker | ||
- id: fix-encoding-pragma | ||
args: | ||
- '--remove' | ||
- id: forbid-new-submodules | ||
- id: no-commit-to-branch | ||
args: | ||
- '--branch' | ||
- 'master' | ||
- id: trailing-whitespace |
This file was deleted.
Oops, something went wrong.