0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-11-24 15:19:31 -05:00

chore: error on bad c++ formatting in ci (#1499)

This commit is contained in:
Ryan Dahl 2024-06-11 11:10:17 -04:00 committed by GitHub
parent def3fd06ec
commit c3687bd565
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 13 deletions

View file

@ -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

View file

@ -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));
}