From 4c77caefb306c74d80c3c7f6e67a90ad40c65a4b Mon Sep 17 00:00:00 2001 From: RafikFarhad Date: Tue, 14 Jul 2020 17:40:03 +0600 Subject: [PATCH] =?UTF-8?q?Example=20workflow=20file=20added=20on=20ReadMe?= =?UTF-8?q?=20=F0=9F=8E=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReadMe.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index acdad00..5f77546 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -18,17 +18,35 @@ Default: `"**/*"`. That means all files in this repository. Example: If your repository contains many files other than C file, you can try with specific extension like: -`"src/*.h,src/*.m"` +`"src/*.h,src/*.c"` or, for all nested folder -`"src/**/*.h,src/**/*.m"` +`"src/**/*.h,src/**/*.c"` ### `style` The style for `clang-format`. Possible value are: `LVM, Google, Chromium, Mozilla, WebKit`. If your repository has a `.clang-format` file in the root directory then you can use `file` option here. Default: `LVM` +## Sample Workflow File +Create a file in `.github/workflows/` folder with: + +``` +name: Clang Format Checker +on: [push] +jobs: + clang-format-checking: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: RafikFarhad/clang-format-github-action@v1-rc2 + with: + sources: "src/**/*.h,src/**/*.c,test/**/*.c" +``` + +It will check for code formation violation on every `push` to GitHub. + ## Version This action uses `clang-format` version 10.