From: "cron2 (Code Review)" Date: Tue, 5 Aug 2025 17:11:00 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <87daa252046dfc225e3e561f508badae0f6818cb-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="/W/GUdRG8Yo="; charset=UTF-8 Subject: [Openvpn-devel] [M] Change in openvpn[master]: Remove uncrustify config and reformat-all.sh List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld , plaisthos Cc: openvpn-devel --/W/GUdRG8Yo= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#17) to the change originally created b= y flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/830?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: Remove uncrustify config and reformat-all.sh ...................................................................... Remove uncrustify config and reformat-all.sh Replaced with clang-format. Change-Id: I15d4946800cbfaead67a73450ff3b12193814e54 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Message-Id: <20250805165906.30010-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32= 543.html Signed-off-by: Gert Doering --- D dev-tools/reformat-all.sh D dev-tools/special-files.lst D dev-tools/uncrustify.conf 3 files changed, 0 insertions(+), 219 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/30/830/17 diff --git a/dev-tools/reformat-all.sh b/dev-tools/reformat-all.sh deleted file mode 100755 index 0a31a83..0000000 --- a/dev-tools/reformat-all.sh +++ /dev/null @@ -1,135 +0,0 @@ -#!/bin/sh -# reformat-all.sh - Reformat all git files in the checked out -# git branch using uncrustify. -# -# Copyright (C) 2016-2025 - David Sommerseth -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# - -tstamp=3D"$(date +%Y%m%d-%H%M%S)" -files=3D"$(pwd)/reformat-all_files-$tstamp.lst" -log=3D"$(pwd)/reformat-all_log-$tstamp.txt" - -srcroot=3D"$(git rev-parse --show-toplevel)" -cfg=3D"$srcroot/dev-tools/uncrustify.conf" -specialfiles=3D"$srcroot/dev-tools/special-files.lst" - -export gitfiles=3D0 -export procfiles=3D0 - -# Go to the root of the source tree -cd "$srcroot" - -{ - echo -n "** Starting $0: " - date - - # Find all C source/header files - git ls-files | grep -E ".*\.[ch](\.in$|$)" > "${files}.git" - - # Manage files which needs special treatment - awk -F\# '{gsub("\n| ", "", $1); print $1}' "$specialfiles" > "${files= }.sp" - while read srcfile - do - res=3D$(grep "$srcfile" "${files}.sp" 2>/dev/null) - if [ $? -ne 0 ]; then - # If grep didn't find the file among special files, - # process it normally - echo "$srcfile" >> "$files" - else - mode=3D$(echo "$res" | cut -d: -f1) - case "$mode" in - E) - echo "** INFO ** Excluding '$srcfile'" - ;; - P) - echo "** INFO ** Pre-patching '$srcfile'" - patchfile=3D"${srcroot}"/dev-tools/reformat-patches/be= fore_$(echo "$srcfile" | tr "/" "_").patch - if [ -r "$patchfile" ]; then - git apply "$patchfile" - if [ $? -ne 0 ]; then - echo "** ERROR ** Failed to apply pre-patch f= ile: $patchfile" - exit 2 - fi - else - echo "** WARN ** Pre-patch file for $srcfile is mi= ssing: $patchfile" - fi - echo "$srcfile" >> "${files}.postpatch" - echo "$srcfile" >> "$files" - ;; - *) - echo "** WARN ** Unknown mode '$mode' for file '$srcfi= le'" - ;; - esac - fi - done < "${files}.git" - rm -f "${files}.git" "${files}.sp" - - # Kick off uncrustify - echo - echo "** INFO ** Running: uncrustify -c $cfg --no-backup -l C -F $file= s" - uncrustify -c "$cfg" --no-backup -l C -F "$files" 2>&1 - res=3D$? - echo "** INFO ** Uncrustify completed (exit code $res)" -} | tee "${log}-1" # Log needs to be closed here, to be processed in next= block - -{ - # Check the results - gitfiles=3D$(wc -l "$files" | cut -d\ -f1) - procfiles=3D$(grep "Parsing: " "${log}-1" | wc -l) - echo - echo "C source/header files checked into git: $gitfiles" - echo "Files processed by uncrustify: $procfiles" - echo - - # Post-Patch files modified after we uncrustify have adjusted them - if [ -r "${files}.postpatch" ]; then - while read srcfile; - do - patchfile=3D"${srcroot}"/dev-tools/reformat-patches/after_$(ec= ho "$srcfile" | tr "/" "_").patch - if [ -r "$patchfile" ]; then - echo "** INFO ** Post-patching '$srcfile'" - git apply "$patchfile" - if [ $? -ne 0 ]; then - echo "** WARN ** Failed to apply $patchfile" - fi - else - echo "** WARN ** Post-patch file for $srcfile is missing: = $patchfile" - fi - done < "${files}.postpatch" - rm -f "${files}.postpatch" - fi -} | tee "${log}-2" # Log needs to be closed here, to be processed in next = block - -cat "${log}-1" "${log}-2" > "$log" - -{ - ec=3D1 - echo - if [ "$gitfiles" -eq "$procfiles" ]; then - echo "Reformatting completed successfully" - ec=3D0 - else - last=3D$(tail -n1 "${log}-1") - echo "** ERROR ** Reformating failed to process all files." - echo " uncrustify exit code: $res" - echo " Last log line: $last" - echo - fi - rm -f "${log}-1" "${log}-2" -} | tee -a "$log" -rm -f "${files}" - -exit $ec diff --git a/dev-tools/special-files.lst b/dev-tools/special-files.lst deleted file mode 100644 index e5f2fc2..0000000 --- a/dev-tools/special-files.lst +++ /dev/null @@ -1,5 +0,0 @@ -E:doc/doxygen/doc_key_generation.h # @verbatim section gets mistreated= , exclude it -E:src/compat/compat-lz4.c # Preserve LZ4 upstream formatting -E:src/compat/compat-lz4.h # Preserve LZ4 upstream formatting -E:src/openvpn/ovpn_dco_linux.h # Preserve ovpn-dco upstream format= ting -E:src/openvpn/ovpn_dco_win.h # Preserve ovpn-dco-win upstream fo= rmatting diff --git a/dev-tools/uncrustify.conf b/dev-tools/uncrustify.conf deleted file mode 100644 index 325f310..0000000 --- a/dev-tools/uncrustify.conf +++ /dev/null @@ -1,79 +0,0 @@ -# Use Allman-style -indent_columns=3D4 -indent_braces=3Dfalse -indent_else_if=3Dfalse -indent_switch_case=3D4 -indent_label=3D1 -nl_if_brace=3Dadd -nl_brace_else=3Dadd -nl_elseif_brace=3Dadd -nl_else_brace=3Dadd -nl_else_if=3Dremove -nl_for_brace=3Dadd -nl_while_brace=3Dadd -nl_switch_brace=3Dadd -nl_fdef_brace=3Dadd -nl_do_brace=3Dadd -sp_func_proto_paren=3DRemove -sp_func_def_paren=3DRemove -sp_func_call_paren=3DRemove -sp_sizeof_paren=3DRemove - -# No tabs, spaces only -indent_with_tabs=3D0 -align_with_tabs=3Dfalse -cmt_convert_tab_to_spaces=3Dtrue - -# Do not put spaces between the # and preprocessor statements -pp_space=3Dremove - -# Various whitespace fiddling -sp_assign=3Dadd -sp_before_sparen=3Dadd -sp_inside_sparen=3Dremove -sp_cond_colon=3Dadd -sp_cond_question=3Dadd -sp_bool=3Dadd -sp_else_brace=3Dadd -sp_brace_else=3Dadd -sp_after_comma=3Dadd -pos_arith=3DLead -pos_bool=3DLead -nl_func_type_name=3Dadd -nl_before_case=3Dtrue -nl_assign_leave_one_liners=3Dtrue -nl_enum_leave_one_liners=3Dtrue -nl_brace_fparen=3Dadd -nl_max=3D4 -nl_after_func_proto=3D2 -nl_end_of_file_min=3D1 -nl_end_of_file=3Dforce - -# Always use scoping braces for conditionals -mod_full_brace_if=3Dadd -mod_full_brace_if_chain=3Dfalse -mod_full_brace_while=3Dadd -mod_full_brace_for=3Dadd -mod_full_brace_do=3Dadd - -# Annotate #else and #endif statements -mod_add_long_ifdef_endif_comment=3D20 -mod_add_long_ifdef_else_comment=3D5 - -# Misc cleanup -mod_remove_extra_semicolon=3Dtrue - -# leave blank at end of empty for() statements -sp_after_semi_for_empty=3DAdd - -# Use C-style comments (/* .. */) -cmt_c_nl_end=3Dtrue -cmt_star_cont=3Dtrue -cmt_cpp_to_c=3Dtrue - -# Use "char **a"-style pointer stars/dereferences -sp_before_ptr_star=3DAdd -sp_between_ptr_star=3DRemove -sp_after_ptr_star=3DRemove -sp_before_byref=3DAdd -sp_after_byref=3DRemove -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/830?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I15d4946800cbfaead67a73450ff3b12193814e54 Gerrit-Change-Number: 830 Gerrit-PatchSet: 17 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-MessageType: newpatchset --/W/GUdRG8Yo= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #17 to the change originally c= reated by flichtenheld.

View Change

The following approvals got outd= ated and were removed: Code-Review+2 by cron2

Remove uncrustify config and reformat-all.sh

= Replaced with clang-format.

Change-Id: I15d4946800cbfaead67a73450ff3= b12193814e54
Signed-off-by: Frank Lichtenheld <frank@...2641...>Acked-by: Gert Doering <gert@...1296...>
Message-Id: <2025080= 5165906.30010-1-gert@...1296...>
URL: https://www.mail-archive.com/op= envpn-devel@lists.sourceforge.net/msg32543.html
Signed-off-by: Gert Doer= ing <gert@...1296...>
---
D dev-tools/reformat-all.sh
D dev-= tools/special-files.lst
D dev-tools/uncrustify.conf
3 files changed, = 0 insertions(+), 219 deletions(-)

git pull ssh://gerrit.openvpn.n=
et:29418/openvpn refs/changes/30/830/17
diff --git a/dev-tools/refo=
rmat-all.sh b/dev-tools/reformat-all.sh
deleted file mode 1= 00755
index 0a31a83..0000000
--- a/dev-tool= s/reformat-all.sh
+++ /dev/null
@@ -1,135 += 0,0 @@
-#!/bin/sh
-# reformat-all.sh - Reforma= t all git files in the checked out
-# git branch using uncrustify.
-#

-# Copyright (C) 2016-2025 - David Sommerseth <davids= @...515...>
-#
-# This program is free soft= ware; you can redistribute it and/or
-# modify it under the terms of the GNU General Public Licens= e
-# as published by th= e Free Software Foundation; either version 2
-# of the License.
-#
-#= This program is distributed in the hope that it will be useful,
= -# but WITHOUT ANY WARRANTY; with= out even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<= /span>
-# GNU General Public L= icense for more details.
-# You should have= received a copy of the GNU General Public License
-# along with this program; if not, see <htt= ps://www.gnu.org/licenses/>.
-#
--tstamp=3D"$(date +%Y%m%d-%= H%M%S)"
-files=3D&= quot;$(pwd)/reformat-all_files-$tstamp.lst"
-log=3D"$(pwd)/reformat-all_log-$tstamp.txt&= quot;
-
-srcroot=3D"$(git rev-parse --sho= w-toplevel)"

-cfg= =3D"$srcroot/dev-tools/uncrustify.conf"
-specialfiles=3D"$srcroot/dev-tools/special= -files.lst"
-
-export gitfiles=3D0=
-export procfiles=3D0<= br>-
-# Go to the root of the source tree
-cd "$srcroot"

-

-{
-= echo -n "** Starting $0: "
- date
-
- # Find all = C source/header files
-= git ls-files | grep -E ".*\.[ch](\.in$|$)" > "${files= }.git"
-- # Manage files which needs = special treatment
- = awk -F\# '{gsub("\n| ", "", $1); print $1}' &qu= ot;$specialfiles" > "${files}.sp"
- while read srcfile
- do
- res=3D$(grep "$srcfile" "${files}.= sp" 2>/dev/null)
- # If grep didn't find the file among special fil= es,
- # proc= ess it normally
- = echo "$srcfile" >> "$files"
- else
- mode=3D$(echo "$res" | c= ut -d: -f1)
- = case "$mode" in
- E)
- echo "** INFO ** Excluding '$srcfile'= "
- = ;;
- = P)
- = echo "** INFO ** Pre-patching '$srcfile'"
<= span style=3D"color: hsl(0, 100%, 40%);">- patchfile=3D&= quot;${srcroot}"/dev-tools/reformat-patches/before_$(echo "$srcfi= le" | tr "/" "_").patch
- if [ -r "$patchfile&quo= t; ]; then
- = git apply "$patchfile"
- if [ $? -ne 0 ]; then

- = echo "** ERROR ** Failed to apply pre-patch file: $patchfile"
- = exit 2
- = fi
- = else
- = echo "** WARN ** Pre-patch file for $srcfile is = missing: $patchfile"
- fi
- echo "$srcfile" >> "${files}.= postpatch"
- = echo "$srcfile" >> "$files"<= br>- ;;=
- *)- echo "= ** WARN ** Unknown mode '$mode' for file '$srcfile'"
- ;;<= /span>
- esac
- fi
- done < "${files}.git"=
- rm -f "${fil= es}.git" "${files}.sp"
-
- #= Kick off uncrustify
- = echo
- echo "= ;** INFO ** Running: uncrustify -c $cfg --no-backup -l C -F $files"
- uncrustify -c "= $cfg" --no-backup -l C -F "$files" 2>&1
- res=3D$?

- echo "** INFO ** Uncrustify comple= ted (exit code $res)"
-} | tee "${log}-1" # Log needs to be closed here, to be pro= cessed in next block
-<= /span>
-{
- # Check the results
- gitfiles=3D$(wc -l "$files"= ; | cut -d\ -f1)
- = procfiles=3D$(grep "Parsing: " "${log}-1" | wc -l)
- echo
- echo "C source/header files ch= ecked into git: $gitfiles"
- echo "Files processed by uncrustify: $procfiles= "
- echo=
-
- # Post-Patch files modified after we uncrusti= fy have adjusted them
-= if [ -r "${files}.postpatch" ]; then
- while read srcfile;
- do
- patchfile=3D"${srcroot}"/dev-= tools/reformat-patches/after_$(echo "$srcfile" | tr "/"= "_").patch
-= if [ -r "$patchfile" ]; then
- echo "** INFO ** Post-pa= tching '$srcfile'"
- git apply "$patchfile"
- if [ $? -ne 0 ]; then<= /span>
- ec= ho "** WARN ** Failed to apply $patchfile"
- fi
- else
- echo "** WARN ** Post-patch fi= le for $srcfile is missing: $patchfile"
- fi
- done < "${files}.postpatch"
= - rm -f "${files}.pos= tpatch"
- fi
-} | tee "${log}-2&q= uot; # Log needs to be closed here, to be processed in next block-
-cat "${log}-1" "${log}-2" > &= quot;$log"
-
-{
- ec=3D1
- echo
- if [ "$gitfiles" -eq "$procfiles" ]; then
- echo "Reformat= ting completed successfully"
- ec=3D0
- else
- = last=3D$(tail -n1 "${log}-1")
- echo "** ERROR ** Reformating failed to proc= ess all files."
- = echo " uncrustify exit code: $res"
- echo " Las= t log line: $last"

- echo
- fi<= /span>
- rm -f "${log}= -1" "${log}-2"
-} | tee -a "$log"
-rm -f "${files}"
-
-ex= it $ec
diff --git a/dev-tools/special-files.lst b/dev-tools= /special-files.lst
deleted file mode 100644
index e5f2fc2..0000000

--- a/dev-tools/special-files.lst
+++ /dev/null
@@ -1,5 +0,0 @@
-E:doc/doxygen/doc_key_generation.h = # @verbatim section gets mistreated, exclude it

-E:src/compat/compat-lz4.c # Prese= rve LZ4 upstream formatting
-E:src/compat/compat-lz4.h # Preserve LZ4 upstream format= ting
-E:src/openvpn/ovp= n_dco_linux.h # Preserve ovpn-dco upstream formatting
-E:src/openvpn/ovpn_dco_win.h = # Preserve ovpn-dco-win upstream formatting

diff --git = a/dev-tools/uncrustify.conf b/dev-tools/uncrustify.conf
del= eted file mode 100644
index 325f310..0000000
--- a/dev-tools/uncrustify.conf

+++ /dev/null
<= span>@@ -1,79 +0,0 @@

-= # Use Allman-style
-ind= ent_columns=3D4
-indent= _braces=3Dfalse
-indent= _else_if=3Dfalse
-inden= t_switch_case=3D4
-inde= nt_label=3D1
-nl_if_bra= ce=3Dadd
-nl_brace_else= =3Dadd
-nl_elseif_brace= =3Dadd
-nl_else_brace= =3Dadd
-nl_else_if=3Dre= move
-nl_for_brace=3Dad= d
-nl_while_brace=3Dadd=
-nl_switch_brace=3Dadd=
-nl_fdef_brace=3Dadd
-nl_do_brace=3Dadd
-sp_func_proto_paren=3DRemov= e
-sp_func_def_paren=3D= Remove
-sp_func_call_pa= ren=3DRemove
-sp_sizeof= _paren=3DRemove
-
-# No tabs, spaces only
-indent_with_tabs=3D0
-align_with_tabs=3Dfalse
-cmt_convert_tab_to_spaces= =3Dtrue
-
-# Do not put spaces between the # a= nd preprocessor statements

-pp_space=3Dremove
= -
-# Various whitespace= fiddling
-sp_assign=3D= add
-sp_before_sparen= =3Dadd
-sp_inside_spare= n=3Dremove
-sp_cond_col= on=3Dadd
-sp_cond_quest= ion=3Dadd
-sp_bool=3Dad= d
-sp_else_brace=3Dadd<= /span>
-sp_brace_else=3Dadd
-sp_after_comma=3Dadd
-pos_arith=3DLead-pos_bool=3DLead
-nl_func_type_name=3Dadd

-nl_before_case=3Dtrue

-nl_assign_leave_one_liners=3Dtrue<= /span>
-nl_enum_leave_one_line= rs=3Dtrue
-nl_brace_fpa= ren=3Dadd
-nl_max=3D4
-nl_after_func_proto=3D2=
-nl_end_of_file_min=3D= 1
-nl_end_of_file=3Dfor= ce
-
-# Always use scoping braces for conditio= nals
-mod_full_brace_if= =3Dadd
-mod_full_brace_= if_chain=3Dfalse
-mod_f= ull_brace_while=3Dadd
-= mod_full_brace_for=3Dadd
-
-# Annotate #else= and #endif statements
= -mod_add_long_ifdef_endif_comment=3D20
-mod_add_long_ifdef_else_comment=3D5
-
-# Misc cleanup
-mod_remove_extra_semicolon=3Dtrue
-
-# lea= ve blank at end of empty for() statements
-sp_after_semi_for_empty=3DAdd
-
-# Use C-style comments (/* .. */)
-cmt_c_nl_end=3Dtrue
-cmt_star_cont=3Dtrue
-cmt_cpp_to_c=3Dtrue
-
-# Use &= quot;char **a"-style pointer stars/dereferences
-sp_before_ptr_star=3DAdd
-sp_between_ptr_star=3DRemove
<= span style=3D"color: hsl(0, 100%, 40%);">-sp_after_ptr_star=3DRemove
=
-sp_before_byref=3DAdd=
-sp_after_byref=3DRemove

To view, visit change 830. To unsubscribe, or fo= r help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I15d4946800cbfaead67a73450ff= 3b12193814e54
Gerrit-Change-Number: 830
Gerrit-PatchSet: 17
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: newpatchset
--/W/GUdRG8Yo=--