Files
yoga/.github/actions/clang-format/action.yml
Nick Gerleman 8bbc40c2b6 nullglob
2022-10-14 09:14:30 -07:00

25 lines
617 B
YAML

name: Clang Format
inputs:
directory:
description: Directory to Lint
required: true
version:
description: LLVM version to use # Should be kept roughly in sync with arcanist
required: false
default: 12
runs:
using: "composite"
steps:
- name: Install
shell: bash
run: sudo apt-get install clang-format-${{ inputs.version }}
- name: clang-format
working-directory: ${{ inputs.directory }}
shell: bash
run: |
shopt -s globstar
shopt -s nullglob
clang-format-${{ inputs.version }} --dry-run --Werror **/*.cpp **/*. **/*.m **/*.mm