mirror of
https://github.com/google/blockly.git
synced 2026-01-08 09:30:06 +01:00
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:
27
.github/workflows/check_clang_format.yml
vendored
Normal file
27
.github/workflows/check_clang_format.yml
vendored
Normal 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`.'
|
||||
})
|
||||
Reference in New Issue
Block a user