Skip to content

Commit

Permalink
Adding github precommit checks
Browse files Browse the repository at this point in the history
  • Loading branch information
computate committed Feb 9, 2024
1 parent dd97961 commit a64ebc8
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/precommit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Run pre-commit checks

on:
pull_request:

jobs:
run-linters:
uses: ocp-on-nerc/workflows/.github/workflows/precommit.yaml@main
26 changes: 26 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
hooks:
- id: remove-tabs

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: check-merge-conflict
- id: end-of-file-fixer
- id: check-added-large-files
exclude: '^cluster-scope/base/openapi/openshift-api-schema.json$'
- id: check-case-conflict
- id: check-json
- id: check-symlinks
- id: detect-private-key

- repo: https://github.com/adrienverge/yamllint.git
rev: v1.32.0
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict

0 comments on commit a64ebc8

Please # to comment.