forked from google/blockly
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: adds a check for properly formatted files (google#5624)
* chore: add check for clang format * chore: updates clang format script
- Loading branch information
1 parent
52c0427
commit 8a89e08
Showing
5 changed files
with
1,014 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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`.' | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.