mirror of
https://github.com/denoland/rusty_v8.git
synced 2024-12-27 01:29:19 -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
|
||||
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)
|
||||
env:
|
||||
SCCACHE_IDLE_TIMEOUT: 0
|
||||
|
@ -220,9 +229,6 @@ jobs:
|
|||
${{ matrix.config.cargo }} clippy --all-targets --locked ${{ env.CARGO_VARIANT_FLAG }}
|
||||
--target ${{ matrix.config.target }} -- -D clippy::all
|
||||
|
||||
- name: Rustfmt
|
||||
run: cargo fmt -- --check
|
||||
|
||||
- name: Prepare binary publish
|
||||
if: matrix.config.variant == 'debug' || matrix.config.variant == 'release'
|
||||
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);
|
||||
}
|
||||
|
||||
void v8__Template__SetIntrinsicDataProperty(
|
||||
const v8::Template& self, const v8::Name& key,
|
||||
v8::Intrinsic intrinsic,
|
||||
v8::PropertyAttribute attr) {
|
||||
ptr_to_local(&self)->SetIntrinsicDataProperty(ptr_to_local(&key),
|
||||
intrinsic, attr);
|
||||
void v8__Template__SetIntrinsicDataProperty(const v8::Template& self,
|
||||
const v8::Name& key,
|
||||
v8::Intrinsic intrinsic,
|
||||
v8::PropertyAttribute attr) {
|
||||
ptr_to_local(&self)->SetIntrinsicDataProperty(ptr_to_local(&key), intrinsic,
|
||||
attr);
|
||||
}
|
||||
|
||||
const v8::ObjectTemplate* v8__ObjectTemplate__New(
|
||||
|
@ -1810,10 +1810,8 @@ size_t v8__ArrayBuffer__ByteLength(const v8::ArrayBuffer& self) {
|
|||
return self.ByteLength();
|
||||
}
|
||||
|
||||
const v8::DataView* v8__DataView__New(
|
||||
const v8::ArrayBuffer& ab,
|
||||
size_t offset,
|
||||
size_t length) {
|
||||
const v8::DataView* v8__DataView__New(const v8::ArrayBuffer& ab, size_t offset,
|
||||
size_t length) {
|
||||
return local_to_ptr(v8::DataView::New(ptr_to_local(&ab), offset, length));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue