Skip to content

Commit

Permalink
Merge pull request #1 from ElioDiNino/pre-commit
Browse files Browse the repository at this point in the history
Setup pre-commit
  • Loading branch information
ElioDiNino authored Sep 21, 2024
2 parents 38fcad4 + 0486394 commit fe7acd8
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Pre-Commit
on:
push:
branches:
- main
pull_request:
jobs:
test:
name: Checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run Pre-commit
uses: pre-commit/[email protected]
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env
46 changes: 46 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-ast # Python syntax
- id: check-case-conflict # VERSION and version in same repo
- id: check-docstring-first # Python docs
- id: check-executables-have-shebangs # #!/bin/bash
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-xml
- id: check-yaml
- id: debug-statements # Python debug stuff
- id: destroyed-symlinks
- id: detect-aws-credentials
args:
- --allow-missing-credentials
- id: detect-private-key
- id: end-of-file-fixer # Forces newline at the end
- id: mixed-line-ending
- id: pretty-format-json
args:
- --autofix
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/google/yamlfmt
rev: v0.13.0
hooks:
- id: yamlfmt
- repo: https://github.com/openstack/bashate
rev: 2.1.1
hooks:
- id: bashate
- repo: https://github.com/gitleaks/gitleaks
rev: v8.19.2
hooks:
- id: gitleaks
- repo: https://github.com/rhysd/actionlint
rev: v1.7.1
hooks:
- id: actionlint

0 comments on commit fe7acd8

Please sign in to comment.