24 lines
592 B
YAML
24 lines
592 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
|
|
clang-format-${{ inputs.version }} --dry-run --Werror **/*.cpp **/*.h **/*.m **/*.mm
|