Files
flameshot/.github/workflows/clang-format.yml
Jeremy Fleischman 5a9ca6bd11 Exclude the external directory with a .clang-format file.
(I copied this trick from https://stackoverflow.com/a/57272592/1739415)

The GitHub clang-format workflow was already ignoring the `external`
directory because of the setting in the `clang-format.yml` file, but
that doesn't help other people running `clang-format` by hand (which the
CONTRIBUTING.md file instructs developers to do). Without this change,
I'd see a bunch of changes appear in the `external/spdlog` every time I
ran clang-format by hand.

I figure it's better to configure this via files that clang knows about
so both the GitHub workflow *and* developers have a closer to identical
experience.
2021-02-11 19:22:54 -06:00

24 lines
551 B
YAML

name: test-clang-format
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Source code
if: github.event_name == 'push'
uses: actions/checkout@v2
- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: DoozyX/clang-format-lint-action@v0.9
with:
source: './src'
extensions: 'h,cpp'
clangFormatVersion: 11
style: file