Skip to content

Clang-Format

Clang-Format #69

Workflow file for this run

name: Clang-Format
on:
push:
branches:
- master
pull_request:
schedule:
- cron: '0 5 * * *'
jobs:
clang_format:
name: Clang Format
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Run Clang Format Check
run: |
sudo apt install clang-format
RED='\033[0;31m'
NC='\033[0m' # No Color
./.run-clang-format
output=$(git diff)
if [ -n "$output" ]; then printf "${RED}Clang format error: run script './.run-clang-format'${NC}\n"; fi
if [ -n "$output" ]; then printf "${RED}${output}${NC}\n"; fi
if [ -n "$output" ]; then exit 1; else exit 0; fi