Skip to content

Commit

Permalink
Re-acivate the formatting CI
Browse files Browse the repository at this point in the history
We had that before with our previous Gitlab config.
  • Loading branch information
stefanscherzinger committed Apr 24, 2024
1 parent 08cf058 commit 190b727
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci_format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Pre-commit as a Github action.
# See: https://github.com/pre-commit/action
# This will run all hooks from the .pre-commit-config.yaml against all files.

name: Format

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
14 changes: 9 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: 'c4a0b883114b00d8d76b479c820ce7950211c99b' # v4.5.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: check-symlinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- id: check-byte-order-marker # Forbid UTF-8 byte-order markers

- repo: local
hooks:
- id: clang-format
name: clang-format
description: Format files with ClangFormat.
entry: clang-format-10
entry: clang-format
language: system
files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|proto|vert)$
args: ['-style=file', '-i']
args: ['-fallback-style=none', '-i']

0 comments on commit 190b727

Please sign in to comment.