Skip to content

Add newlines everywhere #8

Add newlines everywhere

Add newlines everywhere #8

Workflow file for this run

# SPDX-FileCopyrightText: 2024 SeisSol Group
#
# SPDX-License-Identifier: MIT
name: clang-format
on:
- push
jobs:
clang-format:
name: clang-format
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: apt-get
run: |
sudo apt-get update
sudo apt-get -y install python3 python3-pip
# fix version here for now
pip3 install clang-format==18.1.5
- name: run-clang-format
run: |
set -euo pipefail
clang-format --version
which clang-format
# cf. https://stackoverflow.com/a/36046965
find ./include -iname '*.hpp' | xargs clang-format -i
find ./tests -iname '*.cpp' | xargs clang-format -i
git diff > formatting.patch
cat formatting.patch
if [ -s ./formatting.patch ]; then (exit 1); fi