From fe9525073f1756aaa8ec4800bb87106e13b0c15b Mon Sep 17 00:00:00 2001 From: Thomas Nowak Date: Tue, 25 Jun 2024 13:55:53 +0200 Subject: [PATCH] Added pre-commit hooks --- .github/workflows/pre-commit.yaml | 14 ++++++++++++++ .pre-commit-config.yaml | 14 ++++++++++++++ muxtab.tmux | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pre-commit.yaml create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml new file mode 100644 index 0000000..524f04f --- /dev/null +++ b/.github/workflows/pre-commit.yaml @@ -0,0 +1,14 @@ +name: pre-commit + +on: + pull_request: + push: + branches: [main] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - uses: pre-commit/action@v3.0.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..5c74558 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,14 @@ +repos: + - repo: https://github.com/koalaman/shellcheck-precommit + rev: v0.10.0 + hooks: + - id: shellcheck + - repo: https://github.com/scop/pre-commit-shfmt + rev: v3.8.0-1 + hooks: + # Choose one of: + - id: shfmt # prebuilt upstream executable + - repo: https://github.com/codespell-project/codespell + rev: v2.2.4 + hooks: + - id: codespell diff --git a/muxtab.tmux b/muxtab.tmux index 0617957..1a24852 100755 --- a/muxtab.tmux +++ b/muxtab.tmux @@ -1 +1 @@ -#!/usr/bin/env sh +#!/bin/sh