Skip to content

Commit 48e1009

Browse files
authored
Restore "spaces at EOL" and "clang-format" checks in lint job (#2111)
* Fix formatting in quic/quic-server.cpp * Remove stray spaces at EOL in 2 files * Restore "spaces at EOL" and "clang-format" checks in lint job These were accidentally deleted in 6b7af0d.
1 parent 537f20e commit 48e1009

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

.github/workflows/build-ton-linux-x86-64-werror.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ jobs:
4242
-DTON_WERROR_BUILD=On
4343
ninja -C build
4444
45+
- name: Check spaces at EOL
46+
run: |
47+
! git grep --cached -Il '\s$'
48+
49+
- name: Check C++ formatting
50+
run: |
51+
# TODO: Run clang-format only on changed files.
52+
clang-format-21 -i $(git ls-files '*.h' '*.hpp' '*.cpp' ':!^tolk/')
53+
git diff --exit-code
54+
4555
- name: Prepare Python environment
4656
run: |
4757
curl -LsSf https://astral.sh/uv/install.sh | sh

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ if (USE_QUIC)
268268
set(OPENSSL_LIBRARIES ${OPENSSL_LIBRARIES} crypt32 CACHE STRING "OpenSSL libraries" FORCE)
269269
endif()
270270
set(OPENSSL_FOUND TRUE CACHE BOOL "OpenSSL found" FORCE)
271-
271+
272272
function(ngtcp2_scope)
273273
set(BUILD_TESTING OFF)
274274
message("Add ngtcp2 with custom OpenSSL from ${OPENSSL_ROOT_DIR}")
@@ -280,7 +280,7 @@ if (USE_QUIC)
280280
set(NGTCP2_ROOT ${CMAKE_SOURCE_DIR}/third-party/ngtcp2)
281281
endfunction()
282282
ngtcp2_scope()
283-
283+
284284
# Make sure ngtcp2 libraries depend on OpenSSL being built first
285285
add_dependencies(ngtcp2 OpenSSL)
286286
if (TARGET ngtcp2_crypto_quictls)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Execute from MinGW64 shell
116116
chmod +x build-mingw64-clang21.sh
117117
./build-mingw64-clang21.sh -a
118118
```
119-
As a result, you will get fully statically compiled TON windows binaries.
119+
As a result, you will get fully statically compiled TON windows binaries.
120120

121121
### MSYS2 UCRT64 (x86-64)
122122
Execute from ucrt64 shell

quic/quic-server.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,7 @@ void QuicServer::drain_ingress() {
264264
msg_in.address = recv_msg.address;
265265
auto recv_slice = recv_msg.data.as_slice();
266266
if (recv_slice.size() > slice.size()) {
267-
LOG(WARNING) << "dropping inbound packet larger than MTU (" << recv_slice.size() << " > " << slice.size()
268-
<< ")";
267+
LOG(WARNING) << "dropping inbound packet larger than MTU (" << recv_slice.size() << " > " << slice.size() << ")";
269268
return td::Status::OK();
270269
}
271270
slice.truncate(recv_slice.size());

0 commit comments

Comments
 (0)