diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..53100faee --- /dev/null +++ b/.pre-commit-config.yaml @@ -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 +# +# 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 diff --git a/lefthook.yml b/lefthook.yml deleted file mode 100644 index af073d455..000000000 --- a/lefthook.yml +++ /dev/null @@ -1,34 +0,0 @@ -# EXAMPLE USAGE -# Refer for explanation to following link: -# https://github.com/evilmartians/lefthook/blob/master/docs/full_guide.md -# -# pre-push: -# commands: -# packages-audit: -# tags: frontend security -# run: yarn audit -# gems-audit: -# tags: backend security -# run: bundle audit -# -# pre-commit: -# parallel: true -# commands: -# eslint: -# glob: "*.{js,ts}" -# run: yarn eslint {staged_files} -# rubocop: -# tags: backend style -# glob: "*.rb" -# exclude: "application.rb|routes.rb" -# run: bundle exec rubocop --force-exclusion {all_files} -# govet: -# tags: backend style -# files: git ls-files -m -# glob: "*.go" -# run: go vet {files} -# scripts: -# "hello.js": -# runner: node -# "any.go": -# runner: go run