mirror of
https://github.com/denoland/rusty_v8.git
synced 2024-11-28 16:21:04 -05:00
chore: error on bad c++ formatting in ci (#1499)
This commit is contained in:
parent
def3fd06ec
commit
c3687bd565
2 changed files with 17 additions and 13 deletions
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
|
@ -195,6 +195,15 @@ jobs:
|
||||||
uses: dtolnay/rust-toolchain@nightly
|
uses: dtolnay/rust-toolchain@nightly
|
||||||
if: matrix.config.variant == 'asan'
|
if: matrix.config.variant == 'asan'
|
||||||
|
|
||||||
|
- name: check rust code formatting
|
||||||
|
run: cargo fmt --check
|
||||||
|
|
||||||
|
- name: check c++ code formatting
|
||||||
|
if: startsWith(matrix.config.os, 'ubuntu')
|
||||||
|
run: |
|
||||||
|
sudo apt-get install -y clang-format
|
||||||
|
clang-format --Werror --dry-run src/binding.cc
|
||||||
|
|
||||||
- name: Test (ASAN)
|
- name: Test (ASAN)
|
||||||
env:
|
env:
|
||||||
SCCACHE_IDLE_TIMEOUT: 0
|
SCCACHE_IDLE_TIMEOUT: 0
|
||||||
|
@ -220,9 +229,6 @@ jobs:
|
||||||
${{ matrix.config.cargo }} clippy --all-targets --locked ${{ env.CARGO_VARIANT_FLAG }}
|
${{ matrix.config.cargo }} clippy --all-targets --locked ${{ env.CARGO_VARIANT_FLAG }}
|
||||||
--target ${{ matrix.config.target }} -- -D clippy::all
|
--target ${{ matrix.config.target }} -- -D clippy::all
|
||||||
|
|
||||||
- name: Rustfmt
|
|
||||||
run: cargo fmt -- --check
|
|
||||||
|
|
||||||
- name: Prepare binary publish
|
- name: Prepare binary publish
|
||||||
if: matrix.config.variant == 'debug' || matrix.config.variant == 'release'
|
if: matrix.config.variant == 'debug' || matrix.config.variant == 'release'
|
||||||
run: gzip -9c
|
run: gzip -9c
|
||||||
|
|
|
@ -1200,12 +1200,12 @@ void v8__Template__Set(const v8::Template& self, const v8::Name& key,
|
||||||
ptr_to_local(&self)->Set(ptr_to_local(&key), ptr_to_local(&value), attr);
|
ptr_to_local(&self)->Set(ptr_to_local(&key), ptr_to_local(&value), attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void v8__Template__SetIntrinsicDataProperty(
|
void v8__Template__SetIntrinsicDataProperty(const v8::Template& self,
|
||||||
const v8::Template& self, const v8::Name& key,
|
const v8::Name& key,
|
||||||
v8::Intrinsic intrinsic,
|
v8::Intrinsic intrinsic,
|
||||||
v8::PropertyAttribute attr) {
|
v8::PropertyAttribute attr) {
|
||||||
ptr_to_local(&self)->SetIntrinsicDataProperty(ptr_to_local(&key),
|
ptr_to_local(&self)->SetIntrinsicDataProperty(ptr_to_local(&key), intrinsic,
|
||||||
intrinsic, attr);
|
attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
const v8::ObjectTemplate* v8__ObjectTemplate__New(
|
const v8::ObjectTemplate* v8__ObjectTemplate__New(
|
||||||
|
@ -1810,9 +1810,7 @@ size_t v8__ArrayBuffer__ByteLength(const v8::ArrayBuffer& self) {
|
||||||
return self.ByteLength();
|
return self.ByteLength();
|
||||||
}
|
}
|
||||||
|
|
||||||
const v8::DataView* v8__DataView__New(
|
const v8::DataView* v8__DataView__New(const v8::ArrayBuffer& ab, size_t offset,
|
||||||
const v8::ArrayBuffer& ab,
|
|
||||||
size_t offset,
|
|
||||||
size_t length) {
|
size_t length) {
|
||||||
return local_to_ptr(v8::DataView::New(ptr_to_local(&ab), offset, length));
|
return local_to_ptr(v8::DataView::New(ptr_to_local(&ab), offset, length));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue