chore: adds a check for properly formatted files (#5624)

* chore: add check for clang format

* chore: updates clang format script
This commit is contained in:
alschmiedt
2021-10-25 11:43:59 -07:00
committed by GitHub
parent 52c0427d85
commit 8a89e080fd
5 changed files with 1014 additions and 7 deletions

View File

@@ -0,0 +1,27 @@
name: test-clang-format
on: [pull_request]
jobs:
clang-formatter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: DoozyX/clang-format-lint-action@v0.12
with:
source: 'core'
extensions: 'js'
clangFormatVersion: 12
style: Google
- uses: actions/github-script@v5
if: failure()
with:
script: |
console.log(context.issue.number)
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'It looks like some of your files have not been formatted properly. Please run `npm run format`.'
})