[Openvpn-devel,v2] .clang-format: Convert deprecated setting KeepEmptyLinesAtTheStartOfBlocks

Message ID 20260820101226.9581-1-gert@greenie.muc.de
State New
Headers
Series [Openvpn-devel,v2] .clang-format: Convert deprecated setting KeepEmptyLinesAtTheStartOfBlocks |

Commit Message

Gert Doering Aug. 20, 2026, 10:12 a.m. UTC
  From: Frank Lichtenheld <frank@lichtenheld.com>

Convert to new KeepEmptyLines settings. This adds
AtStartOfFile setting and applies it.

Change-Id: Ibb80db0547dcc0935964c9bd40222c27aac80439
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Razvan Cojocaru <razvanc@mailbox.org>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1848
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1848
This mail reflects revision 2 of this Change.

Acked-by according to Gerrit (reflected above):
Razvan Cojocaru <razvanc@mailbox.org>
  

Comments

Gert Doering Aug. 20, 2026, 11:02 a.m. UTC | #1
I wouldn't know anything about clang-format, but if Razvan says it's fine
and our buildbots that *do* check the formatting of code-after-patching
do not complain, it sounds correct - and the resulting change, removing
whitespace at the top of these two .h files, also makes sense.

Your patch has been applied to the master and release/2.7 branch
(dev tools, same formatting rules).

commit 34661b1e1e06df3d6bbfdb85a33db87b33a79034 (master)
commit fd89ec74140f7b932ef79a8e7cb5e30d8f23a147 (release/2.7)
Author: Frank Lichtenheld
Date:   Thu Aug 20 12:12:21 2026 +0200

     .clang-format: Convert deprecated setting KeepEmptyLinesAtTheStartOfBlocks

     Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
     Acked-by: Razvan Cojocaru <razvanc@mailbox.org>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1848
     Message-Id: <20260820101226.9581-1-gert@greenie.muc.de>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg38551.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering
  

Patch

diff --git a/.clang-format b/.clang-format
index 4774d1e..0823739 100644
--- a/.clang-format
+++ b/.clang-format
@@ -32,7 +32,10 @@ 
 IndentWidth: '4'
 IndentWrappedFunctionNames: false
 InsertBraces: true
-KeepEmptyLinesAtTheStartOfBlocks: false
+KeepEmptyLines:
+  AtEndOfFile: false
+  AtStartOfBlock: false
+  AtStartOfFile: false
 MaxEmptyLinesToKeep: '2'
 PointerAlignment: Right
 ReflowComments: true
diff --git a/src/openvpn/crypto_mbedtls.h b/src/openvpn/crypto_mbedtls.h
index 04346a9..5c3b670 100644
--- a/src/openvpn/crypto_mbedtls.h
+++ b/src/openvpn/crypto_mbedtls.h
@@ -1,4 +1,3 @@ 
-
 /*
  *  OpenVPN -- An application to securely tunnel IP networks
  *             over a single TCP/UDP port, with support for SSL/TLS-based
diff --git a/src/openvpnserv/validate.h b/src/openvpnserv/validate.h
index 12150f1..2da41dc 100644
--- a/src/openvpnserv/validate.h
+++ b/src/openvpnserv/validate.h
@@ -1,4 +1,3 @@ 
-
 /*
  *  OpenVPN -- An application to securely tunnel IP networks
  *             over a single TCP/UDP port, with support for SSL/TLS-based