• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: Formatting
2
3on:
4  push:
5    branches:
6      - stable
7      - dev
8  pull_request:
9    branches:
10      - dev # No need for stable-pull-request, as that equals dev-push
11
12jobs:
13  code-format-check:
14    name: Check code format
15    if: ${{ 'false' == 'true' }} # Disable the job
16    runs-on: ubuntu-22.04
17    container: docker.io/aflplusplus/aflplusplus:dev
18    steps:
19      - name: Checkout
20        uses: actions/checkout@v3
21      - name: Format
22        run: |
23          git config --global --add safe.directory /__w/AFLplusplus/AFLplusplus
24          apt-get update
25          apt-get install -y clang-format-${LLVM_VERSION}
26          make code-format
27      - name: Check if code needed formatting
28        run: |
29          git --no-pager -c color.ui=always diff HEAD
30          if ! git diff HEAD --quiet; then
31            echo "[!] Please run 'make code-format' and push its changes."
32            exit 1
33          fi
34