mirror of
https://github.com/google/blockly.git
synced 2026-01-11 02:47:09 +01:00
chore: applies fixes to clang format (#5677)
* chore: update the clang-format version * chore: specify the clang format version to use * chore: remove style tag since it will default to file
This commit is contained in:
8
.github/workflows/check_clang_format.yml
vendored
8
.github/workflows/check_clang_format.yml
vendored
@@ -10,12 +10,14 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: DoozyX/clang-format-lint-action@v0.12
|
||||
- uses: DoozyX/clang-format-lint-action@v0.13
|
||||
with:
|
||||
source: 'core'
|
||||
extensions: 'js'
|
||||
clangFormatVersion: 12
|
||||
style: Google
|
||||
# This should be as close as possible to the version that the npm
|
||||
# package supports. This can be found by running:
|
||||
# npx clang-format --version.
|
||||
clangFormatVersion: 13
|
||||
|
||||
# The Report clang format workflow (report_clang_format.yml) will
|
||||
# run (if required) after this one to post a comment to the PR.
|
||||
|
||||
14
package-lock.json
generated
14
package-lock.json
generated
@@ -17,7 +17,7 @@
|
||||
"@wdio/selenium-standalone-service": "^7.10.1",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"chai": "^4.2.0",
|
||||
"clang-format": "^1.5.0",
|
||||
"clang-format": "^1.6.0",
|
||||
"concurrently": "^6.0.0",
|
||||
"eslint": "^7.28.0",
|
||||
"google-closure-compiler": "^20211006.0.0",
|
||||
@@ -3585,9 +3585,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/clang-format": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/clang-format/-/clang-format-1.5.0.tgz",
|
||||
"integrity": "sha512-C1LucFX7E+ABVYcPEbBHM4PYQ2+WInXsqsLpFlQ9cmRfSbk7A7b1I06h/nE4bQ3MsyEkb31jY2gC0Dtc76b4IA==",
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/clang-format/-/clang-format-1.6.0.tgz",
|
||||
"integrity": "sha512-W3/L7fWkA8DoLkz9UGjrRnNi+J5a5TuS2HDLqk6WsicpOzb66MBu4eY/EcXhicHriVnAXWQVyk5/VeHWY6w4ow==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"async": "^1.5.2",
|
||||
@@ -18130,9 +18130,9 @@
|
||||
}
|
||||
},
|
||||
"clang-format": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/clang-format/-/clang-format-1.5.0.tgz",
|
||||
"integrity": "sha512-C1LucFX7E+ABVYcPEbBHM4PYQ2+WInXsqsLpFlQ9cmRfSbk7A7b1I06h/nE4bQ3MsyEkb31jY2gC0Dtc76b4IA==",
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/clang-format/-/clang-format-1.6.0.tgz",
|
||||
"integrity": "sha512-W3/L7fWkA8DoLkz9UGjrRnNi+J5a5TuS2HDLqk6WsicpOzb66MBu4eY/EcXhicHriVnAXWQVyk5/VeHWY6w4ow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"async": "^1.5.2",
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
"@wdio/selenium-standalone-service": "^7.10.1",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"chai": "^4.2.0",
|
||||
"clang-format": "^1.5.0",
|
||||
"clang-format": "^1.6.0",
|
||||
"concurrently": "^6.0.0",
|
||||
"eslint": "^7.28.0",
|
||||
"google-closure-compiler": "^20211006.0.0",
|
||||
|
||||
@@ -18,6 +18,7 @@ var fs = require('fs');
|
||||
var execSync = require('child_process').execSync;
|
||||
var through2 = require('through2');
|
||||
|
||||
const clangFormat = require('clang-format');
|
||||
const clangFormatter = require('gulp-clang-format');
|
||||
var closureCompiler = require('google-closure-compiler').gulp();
|
||||
var closureDeps = require('google-closure-deps');
|
||||
@@ -516,7 +517,7 @@ function cleanBuildDir(done) {
|
||||
*/
|
||||
function format() {
|
||||
return gulp.src(['core/**/*.js'], {base: '.'})
|
||||
.pipe(clangFormatter.format('file'))
|
||||
.pipe(clangFormatter.format('file', clangFormat))
|
||||
.pipe(gulp.dest('.'));
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user