Skip to content

Maintenance

Maintenance #1184

Workflow file for this run

name: Code Style
on: pull_request
jobs:
clang-format:
name: Clang Format
runs-on: ubuntu-latest
container: ubuntu:rolling
env:
DEBIAN_FRONTEND: "noninteractive"
steps:
- name: Update environment
shell: bash
run: |
# Update package lists
apt update -qq
# Install tools
apt install -y \
clang-format \
git
- name: Checkout
uses: actions/checkout@v3
- name: Fetch ${{ github.base_ref }}
shell: bash
run: |
git config --global --add safe.directory $(pwd)
git fetch --progress --depth=1 origin ${{ github.base_ref }}
git log --pretty=oneline
- name: Style check
shell: bash
run: |
git-clang-format origin/${{ github.base_ref }}
git diff | tee format-diff
if [ -s format-diff ]; then exit 1; fi