From: flichtenheld (C. Review) <ge...@op...> - 2025-03-19 15:28:16
|
Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/790?usp=email to review the following change. Change subject: Define a .clang-format file for the project ...................................................................... Define a .clang-format file for the project Each of these statements has been reviewed but not all of them are obvious. Also add a pre-commit config to easily check the formatting. Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Signed-off-by: Frank Lichtenheld <fr...@li...> --- A .clang-format A .pre-commit-config.yaml 2 files changed, 54 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/90/790/9 diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..0960fe7 --- /dev/null +++ b/.clang-format @@ -0,0 +1,46 @@ +--- +BasedOnStyle: Mozilla +AccessModifierOffset: '-4' +AlignAfterOpenBracket: Align +AlignConsecutiveMacros: + Enabled: true + AcrossEmptyLines: false + AcrossComments: true +AlignEscapedNewlines: Left +AlignOperands: true +AlignTrailingComments: + Kind: Always + OverEmptyLines: 1 +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: Never +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: None +AllowShortIfStatementsOnASingleLine: Never +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterReturnType: None +BreakBeforeBinaryOperators: NonAssignment +BreakBeforeBraces: Allman +BreakBeforeTernaryOperators: true +BreakStringLiterals: false +ColumnLimit: '100' +ContinuationIndentWidth: '4' +DerivePointerAlignment: false +IndentCaseLabels: true +IndentGotoLabels: false +IndentWidth: '4' +IndentWrappedFunctionNames: false +KeepEmptyLinesAtTheStartOfBlocks: false +Language: Cpp +MaxEmptyLinesToKeep: '2' +PointerAlignment: Right +ReflowComments: true +SortIncludes: false +SpaceAfterCStyleCast: false +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: ControlStatements +SpacesBeforeTrailingComments: '2' +SpacesInParens: Never +TabWidth: '4' +TypeNames: [DWORD] +UseTab: Never +WhitespaceSensitiveMacros: [_STRINGIFY] diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..0f09a06 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +repos: + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: 'v19.1.4' + hooks: + - id: clang-format + files: \.[ch]$ + # preserve upstream formatting + exclude: ^(src/compat/compat-lz4\.[ch]|src/openvpn/ovpn_dco_(linux|win)\.h)$ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/790?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Gerrit-Change-Number: 790 Gerrit-PatchSet: 9 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-MessageType: newchange |
From: plaisthos (C. Review) <ge...@op...> - 2025-03-20 07:16:00
|
Attention is currently required from: flichtenheld. plaisthos has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/790?usp=email ) Change subject: Define a .clang-format file for the project ...................................................................... Patch Set 9: (1 comment) File .clang-format: http://gerrit.openvpn.net/c/openvpn/+/790/comment/da770a5b_173d2642 : PS9, Line 25: ColumnLimit: '100' How did we end up with 100? Before we had something like a 80 soft and 120 hard limit. This would change that to a 100 hard if I understand that? -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/790?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Gerrit-Change-Number: 790 Gerrit-PatchSet: 9 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: flichtenheld <fr...@li...> Gerrit-Comment-Date: Thu, 20 Mar 2025 07:15:40 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment |
From: flichtenheld (C. Review) <ge...@op...> - 2025-03-20 10:33:58
|
Attention is currently required from: plaisthos. flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/790?usp=email ) Change subject: Define a .clang-format file for the project ...................................................................... Patch Set 9: (1 comment) File .clang-format: http://gerrit.openvpn.net/c/openvpn/+/790/comment/f971bb03_d7cf6623 : PS9, Line 25: ColumnLimit: '100' > How did we end up with 100? […] Before we had *no* limits, our `uncrustify.conf` does not enforce any. I came up with the 100 by looking at the code and seeing how well it fits. 100 seems a good compromise to me. With clang-format it will use the full width available to it. So 120 is too wide I think, but 80 is obviously much too restrictive. If you prefer a different limit, let me know. -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/790?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Gerrit-Change-Number: 790 Gerrit-PatchSet: 9 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Comment-Date: Thu, 20 Mar 2025 10:33:38 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: plaisthos <arn...@rf...> Gerrit-MessageType: comment |
From: flichtenheld (C. Review) <ge...@op...> - 2025-04-16 11:52:37
|
Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/790?usp=email to look at the new patch set (#11). Change subject: Define a .clang-format file for the project ...................................................................... Define a .clang-format file for the project Each of these statements has been reviewed but not all of them are obvious. Also add a pre-commit config to easily check the formatting. Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Signed-off-by: Frank Lichtenheld <fr...@li...> --- A .clang-format A .pre-commit-config.yaml 2 files changed, 55 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/90/790/11 diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..77a7d6d --- /dev/null +++ b/.clang-format @@ -0,0 +1,47 @@ +--- +BasedOnStyle: Mozilla +AccessModifierOffset: '-4' +AlignAfterOpenBracket: Align +AlignConsecutiveMacros: + Enabled: true + AcrossEmptyLines: false + AcrossComments: true +AlignEscapedNewlines: Left +AlignOperands: true +AlignTrailingComments: + Kind: Always + OverEmptyLines: 1 +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: Never +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: None +AllowShortIfStatementsOnASingleLine: Never +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterReturnType: None +BinPackArguments: true +BreakBeforeBinaryOperators: NonAssignment +BreakBeforeBraces: Allman +BreakBeforeTernaryOperators: true +BreakStringLiterals: false +ColumnLimit: '100' +ContinuationIndentWidth: '4' +DerivePointerAlignment: false +IndentCaseLabels: true +IndentGotoLabels: false +IndentWidth: '4' +IndentWrappedFunctionNames: false +KeepEmptyLinesAtTheStartOfBlocks: false +Language: Cpp +MaxEmptyLinesToKeep: '2' +PointerAlignment: Right +ReflowComments: true +SortIncludes: false +SpaceAfterCStyleCast: false +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: ControlStatements +SpacesBeforeTrailingComments: '2' +SpacesInParens: Never +TabWidth: '4' +TypeNames: [DWORD] +UseTab: Never +WhitespaceSensitiveMacros: [_STRINGIFY] diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..0f09a06 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +repos: + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: 'v19.1.4' + hooks: + - id: clang-format + files: \.[ch]$ + # preserve upstream formatting + exclude: ^(src/compat/compat-lz4\.[ch]|src/openvpn/ovpn_dco_(linux|win)\.h)$ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/790?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Gerrit-Change-Number: 790 Gerrit-PatchSet: 11 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-MessageType: newpatchset |
From: flichtenheld (C. Review) <ge...@op...> - 2025-04-16 12:02:15
|
Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/790?usp=email to look at the new patch set (#12). Change subject: Define a .clang-format file for the project ...................................................................... Define a .clang-format file for the project Each of these statements has been reviewed but not all of them are obvious. Also add a pre-commit config to easily check the formatting. Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Signed-off-by: Frank Lichtenheld <fr...@li...> --- A .clang-format A .pre-commit-config.yaml 2 files changed, 58 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/90/790/12 diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..7f6073e --- /dev/null +++ b/.clang-format @@ -0,0 +1,50 @@ +--- +BasedOnStyle: Mozilla +AccessModifierOffset: '-4' +AlignAfterOpenBracket: Align +AlignConsecutiveMacros: + Enabled: true + AcrossEmptyLines: false + AcrossComments: true +AlignEscapedNewlines: Left +AlignOperands: true +AlignTrailingComments: + Kind: Always + OverEmptyLines: 1 +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: Never +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: None +AllowShortIfStatementsOnASingleLine: Never +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterReturnType: None +BinPackArguments: true +BreakBeforeBinaryOperators: NonAssignment +BreakBeforeBraces: Allman +BreakBeforeTernaryOperators: true +BreakStringLiterals: false +ColumnLimit: '100' +ContinuationIndentWidth: '4' +DerivePointerAlignment: false +IndentCaseLabels: true +IndentGotoLabels: false +IndentWidth: '4' +IndentWrappedFunctionNames: false +KeepEmptyLinesAtTheStartOfBlocks: false +MaxEmptyLinesToKeep: '2' +PointerAlignment: Right +ReflowComments: true +SortIncludes: false +SpaceAfterCStyleCast: false +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: ControlStatements +SpacesBeforeTrailingComments: '2' +SpacesInParens: Never +TabWidth: '4' +TypeNames: [DWORD] +UseTab: Never +WhitespaceSensitiveMacros: [_STRINGIFY] +--- +Language: C +--- +Language: Cpp diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..c1bca47 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +repos: + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: 'v20.1.0' + hooks: + - id: clang-format + files: \.[ch]$ + # preserve upstream formatting + exclude: ^(src/compat/compat-lz4\.[ch]|src/openvpn/ovpn_dco_(linux|win)\.h)$ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/790?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Gerrit-Change-Number: 790 Gerrit-PatchSet: 12 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-MessageType: newpatchset |
From: flichtenheld (C. Review) <ge...@op...> - 2025-04-30 13:01:14
|
Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/790?usp=email to look at the new patch set (#13). Change subject: Define a .clang-format file for the project ...................................................................... Define a .clang-format file for the project Each of these statements has been reviewed but not all of them are obvious. Also add a pre-commit config to easily check the formatting. Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Signed-off-by: Frank Lichtenheld <fr...@li...> --- A .clang-format A .pre-commit-config.yaml 2 files changed, 59 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/90/790/13 diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..b95d58d --- /dev/null +++ b/.clang-format @@ -0,0 +1,51 @@ +--- +BasedOnStyle: Mozilla +AccessModifierOffset: '-4' +AlignAfterOpenBracket: Align +AlignConsecutiveMacros: + Enabled: true + AcrossEmptyLines: false + AcrossComments: true +AlignEscapedNewlines: Left +AlignOperands: true +AlignTrailingComments: + Kind: Always + OverEmptyLines: 1 +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: Never +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: None +AllowShortIfStatementsOnASingleLine: Never +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterReturnType: None +BinPackArguments: true +BinPackParameters: true +BreakBeforeBinaryOperators: NonAssignment +BreakBeforeBraces: Allman +BreakBeforeTernaryOperators: true +BreakStringLiterals: false +ColumnLimit: '100' +ContinuationIndentWidth: '4' +DerivePointerAlignment: false +IndentCaseLabels: true +IndentGotoLabels: false +IndentWidth: '4' +IndentWrappedFunctionNames: false +KeepEmptyLinesAtTheStartOfBlocks: false +MaxEmptyLinesToKeep: '2' +PointerAlignment: Right +ReflowComments: true +SortIncludes: false +SpaceAfterCStyleCast: false +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: ControlStatements +SpacesBeforeTrailingComments: '2' +SpacesInParens: Never +TabWidth: '4' +TypeNames: [DWORD] +UseTab: Never +WhitespaceSensitiveMacros: [_STRINGIFY] +--- +Language: C +--- +Language: Cpp diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..c1bca47 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +repos: + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: 'v20.1.0' + hooks: + - id: clang-format + files: \.[ch]$ + # preserve upstream formatting + exclude: ^(src/compat/compat-lz4\.[ch]|src/openvpn/ovpn_dco_(linux|win)\.h)$ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/790?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Gerrit-Change-Number: 790 Gerrit-PatchSet: 13 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-MessageType: newpatchset |
From: flichtenheld (C. Review) <ge...@op...> - 2025-05-26 10:36:48
|
Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/790?usp=email to look at the new patch set (#15). Change subject: Define a .clang-format file for the project ...................................................................... Define a .clang-format file for the project Each of these statements has been reviewed but not all of them are obvious. Also add a pre-commit config to easily check the formatting. Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Signed-off-by: Frank Lichtenheld <fr...@li...> --- A .clang-format A .pre-commit-config.yaml 2 files changed, 59 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/90/790/15 diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..c314fca --- /dev/null +++ b/.clang-format @@ -0,0 +1,51 @@ +--- +BasedOnStyle: Mozilla +AccessModifierOffset: '-4' +AlignAfterOpenBracket: Align +AlignConsecutiveMacros: + Enabled: true + AcrossEmptyLines: false + AcrossComments: true +AlignEscapedNewlines: Left +AlignOperands: true +AlignTrailingComments: + Kind: Always + OverEmptyLines: 1 +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: Never +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: None +AllowShortIfStatementsOnASingleLine: Never +AllowShortLoopsOnASingleLine: false +BinPackArguments: true +BinPackParameters: true +BreakAfterReturnType: AllDefinitions +BreakBeforeBinaryOperators: NonAssignment +BreakBeforeBraces: Allman +BreakBeforeTernaryOperators: true +BreakStringLiterals: false +ColumnLimit: '100' +ContinuationIndentWidth: '4' +DerivePointerAlignment: false +IndentCaseLabels: true +IndentGotoLabels: false +IndentWidth: '4' +IndentWrappedFunctionNames: false +KeepEmptyLinesAtTheStartOfBlocks: false +MaxEmptyLinesToKeep: '2' +PointerAlignment: Right +ReflowComments: true +SortIncludes: false +SpaceAfterCStyleCast: false +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: ControlStatements +SpacesBeforeTrailingComments: '2' +SpacesInParens: Never +TabWidth: '4' +TypeNames: [DWORD] +UseTab: Never +WhitespaceSensitiveMacros: [_STRINGIFY] +--- +Language: C +--- +Language: Cpp diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..c1bca47 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +repos: + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: 'v20.1.0' + hooks: + - id: clang-format + files: \.[ch]$ + # preserve upstream formatting + exclude: ^(src/compat/compat-lz4\.[ch]|src/openvpn/ovpn_dco_(linux|win)\.h)$ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/790?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Gerrit-Change-Number: 790 Gerrit-PatchSet: 15 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-MessageType: newpatchset |
From: cron2 (C. Review) <ge...@op...> - 2025-05-31 21:01:26
|
Attention is currently required from: flichtenheld, plaisthos. cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/790?usp=email ) Change subject: Define a .clang-format file for the project ...................................................................... Patch Set 15: Code-Review-1 (1 comment) File .pre-commit-config.yaml: http://gerrit.openvpn.net/c/openvpn/+/790/comment/87528ad6_ed45d1b7 : PS15, Line 9: I don't really like this - call me oldfashioned, but requiring python to install something magic from an unknown github url into my most holy repo is not what I feel comfortable with. I'd really prefer to adjust the commit hook we have and keep all this "magic repo related stuff" *in* the repo. -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/790?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Gerrit-Change-Number: 790 Gerrit-PatchSet: 15 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: cron2 <ge...@gr...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Attention: flichtenheld <fr...@li...> Gerrit-Comment-Date: Sat, 31 May 2025 21:01:11 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment |
From: flichtenheld (C. Review) <ge...@op...> - 2025-06-02 10:25:37
|
Attention is currently required from: cron2, plaisthos. flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/790?usp=email ) Change subject: Define a .clang-format file for the project ...................................................................... Patch Set 15: (1 comment) File .pre-commit-config.yaml: http://gerrit.openvpn.net/c/openvpn/+/790/comment/258aae77_531d3e83 : PS15, Line 9: > I don't really like this - call me oldfashioned, but requiring python to install something magic fro […] This is "take it or leave it". I really am not willing to maintain some sort-of-working shell code instead of a 3rd-party solution that comes with many additional features. Most importantly using the exact version of clang-format I specify. I maintain a dozen of repositories, I really will not maintain a hook in every one of those. -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/790?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Gerrit-Change-Number: 790 Gerrit-PatchSet: 15 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: cron2 <ge...@gr...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Attention: cron2 <ge...@gr...> Gerrit-Comment-Date: Mon, 02 Jun 2025 10:25:16 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: cron2 <ge...@gr...> Gerrit-MessageType: comment |
From: flichtenheld (C. Review) <ge...@op...> - 2025-06-27 16:50:47
|
Attention is currently required from: cron2, plaisthos. flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/790?usp=email ) Change subject: Define a .clang-format file for the project ...................................................................... Patch Set 16: (1 comment) File .pre-commit-config.yaml: http://gerrit.openvpn.net/c/openvpn/+/790/comment/5597360b_bf2ebcec : PS15, Line 9: > This is "take it or leave it". […] See https://gerrit.openvpn.net/c/openvpn/+/1070 -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/790?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Gerrit-Change-Number: 790 Gerrit-PatchSet: 16 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: cron2 <ge...@gr...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Attention: cron2 <ge...@gr...> Gerrit-Comment-Date: Fri, 27 Jun 2025 16:50:33 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: cron2 <ge...@gr...> Comment-In-Reply-To: flichtenheld <fr...@li...> Gerrit-MessageType: comment |
From: cron2 (C. Review) <ge...@op...> - 2025-08-03 15:01:44
|
Attention is currently required from: flichtenheld, plaisthos. cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/790?usp=email ) Change subject: Define a .clang-format file for the project ...................................................................... Patch Set 18: Code-Review+2 -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/790?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Gerrit-Change-Number: 790 Gerrit-PatchSet: 18 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: cron2 <ge...@gr...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Attention: flichtenheld <fr...@li...> Gerrit-Comment-Date: Sun, 03 Aug 2025 15:01:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment |
From: Gert D. <ge...@gr...> - 2025-08-03 15:02:02
|
From: Frank Lichtenheld <fr...@li...> Each of these statements has been reviewed but not all of them are obvious. Also add a pre-commit config to easily check the formatting. Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Signed-off-by: Frank Lichtenheld <fr...@li...> Acked-by: Gert Doering <ge...@gr...> --- 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/+/790 This mail reflects revision 18 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering <ge...@gr...> diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..c314fca --- /dev/null +++ b/.clang-format @@ -0,0 +1,51 @@ +--- +BasedOnStyle: Mozilla +AccessModifierOffset: '-4' +AlignAfterOpenBracket: Align +AlignConsecutiveMacros: + Enabled: true + AcrossEmptyLines: false + AcrossComments: true +AlignEscapedNewlines: Left +AlignOperands: true +AlignTrailingComments: + Kind: Always + OverEmptyLines: 1 +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: Never +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: None +AllowShortIfStatementsOnASingleLine: Never +AllowShortLoopsOnASingleLine: false +BinPackArguments: true +BinPackParameters: true +BreakAfterReturnType: AllDefinitions +BreakBeforeBinaryOperators: NonAssignment +BreakBeforeBraces: Allman +BreakBeforeTernaryOperators: true +BreakStringLiterals: false +ColumnLimit: '100' +ContinuationIndentWidth: '4' +DerivePointerAlignment: false +IndentCaseLabels: true +IndentGotoLabels: false +IndentWidth: '4' +IndentWrappedFunctionNames: false +KeepEmptyLinesAtTheStartOfBlocks: false +MaxEmptyLinesToKeep: '2' +PointerAlignment: Right +ReflowComments: true +SortIncludes: false +SpaceAfterCStyleCast: false +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: ControlStatements +SpacesBeforeTrailingComments: '2' +SpacesInParens: Never +TabWidth: '4' +TypeNames: [DWORD] +UseTab: Never +WhitespaceSensitiveMacros: [_STRINGIFY] +--- +Language: C +--- +Language: Cpp diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..c1bca47 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +repos: + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: 'v20.1.0' + hooks: + - id: clang-format + files: \.[ch]$ + # preserve upstream formatting + exclude: ^(src/compat/compat-lz4\.[ch]|src/openvpn/ovpn_dco_(linux|win)\.h)$ |
From: Gert D. <ge...@gr...> - 2025-08-04 08:26:07
|
So, this is the beginning of the Grand Reformatting of 2025 - here are the rules, that have been out for review for a long time, and all the more active community members have either signalled "yeah, fine, I do not care much either way" or "this is ok for me". We move from uncrustify to clang-format, because uncrustify has become a maintenance chore - newer versions break our formatting in interesting ways, and pinning buildbots/GHA to old versions is nontrivial effort. *This* does not change any formatting, nor does it auto-install any new hooks. More commits will follow. Your patch has been applied to the master branch. commit bba057b0573fa788e400a8490b5375153df87141 Author: Frank Lichtenheld Date: Sun Aug 3 17:01:37 2025 +0200 Define a .clang-format file for the project Signed-off-by: Frank Lichtenheld <fr...@li...> Acked-by: Gert Doering <ge...@gr...> Message-Id: <202...@gr...> URL: https://www.mail-archive.com/ope...@li.../msg32484.html Signed-off-by: Gert Doering <ge...@gr...> -- kind regards, Gert Doering |
From: cron2 (C. Review) <ge...@op...> - 2025-08-04 08:26:13
|
cron2 has uploaded a new patch set (#19) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/790?usp=email ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: Define a .clang-format file for the project ...................................................................... Define a .clang-format file for the project Each of these statements has been reviewed but not all of them are obvious. Also add a pre-commit config to easily check the formatting. Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Signed-off-by: Frank Lichtenheld <fr...@li...> Acked-by: Gert Doering <ge...@gr...> Message-Id: <202...@gr...> URL: https://www.mail-archive.com/ope...@li.../msg32484.html Signed-off-by: Gert Doering <ge...@gr...> --- A .clang-format A .pre-commit-config.yaml 2 files changed, 59 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/90/790/19 diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..c314fca --- /dev/null +++ b/.clang-format @@ -0,0 +1,51 @@ +--- +BasedOnStyle: Mozilla +AccessModifierOffset: '-4' +AlignAfterOpenBracket: Align +AlignConsecutiveMacros: + Enabled: true + AcrossEmptyLines: false + AcrossComments: true +AlignEscapedNewlines: Left +AlignOperands: true +AlignTrailingComments: + Kind: Always + OverEmptyLines: 1 +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: Never +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: None +AllowShortIfStatementsOnASingleLine: Never +AllowShortLoopsOnASingleLine: false +BinPackArguments: true +BinPackParameters: true +BreakAfterReturnType: AllDefinitions +BreakBeforeBinaryOperators: NonAssignment +BreakBeforeBraces: Allman +BreakBeforeTernaryOperators: true +BreakStringLiterals: false +ColumnLimit: '100' +ContinuationIndentWidth: '4' +DerivePointerAlignment: false +IndentCaseLabels: true +IndentGotoLabels: false +IndentWidth: '4' +IndentWrappedFunctionNames: false +KeepEmptyLinesAtTheStartOfBlocks: false +MaxEmptyLinesToKeep: '2' +PointerAlignment: Right +ReflowComments: true +SortIncludes: false +SpaceAfterCStyleCast: false +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: ControlStatements +SpacesBeforeTrailingComments: '2' +SpacesInParens: Never +TabWidth: '4' +TypeNames: [DWORD] +UseTab: Never +WhitespaceSensitiveMacros: [_STRINGIFY] +--- +Language: C +--- +Language: Cpp diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..c1bca47 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +repos: + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: 'v20.1.0' + hooks: + - id: clang-format + files: \.[ch]$ + # preserve upstream formatting + exclude: ^(src/compat/compat-lz4\.[ch]|src/openvpn/ovpn_dco_(linux|win)\.h)$ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/790?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Gerrit-Change-Number: 790 Gerrit-PatchSet: 19 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: cron2 <ge...@gr...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-MessageType: newpatchset |
From: cron2 (C. Review) <ge...@op...> - 2025-08-04 08:26:19
|
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/790?usp=email ) Change subject: Define a .clang-format file for the project ...................................................................... Define a .clang-format file for the project Each of these statements has been reviewed but not all of them are obvious. Also add a pre-commit config to easily check the formatting. Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Signed-off-by: Frank Lichtenheld <fr...@li...> Acked-by: Gert Doering <ge...@gr...> Message-Id: <202...@gr...> URL: https://www.mail-archive.com/ope...@li.../msg32484.html Signed-off-by: Gert Doering <ge...@gr...> --- A .clang-format A .pre-commit-config.yaml 2 files changed, 59 insertions(+), 0 deletions(-) diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..c314fca --- /dev/null +++ b/.clang-format @@ -0,0 +1,51 @@ +--- +BasedOnStyle: Mozilla +AccessModifierOffset: '-4' +AlignAfterOpenBracket: Align +AlignConsecutiveMacros: + Enabled: true + AcrossEmptyLines: false + AcrossComments: true +AlignEscapedNewlines: Left +AlignOperands: true +AlignTrailingComments: + Kind: Always + OverEmptyLines: 1 +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: Never +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: None +AllowShortIfStatementsOnASingleLine: Never +AllowShortLoopsOnASingleLine: false +BinPackArguments: true +BinPackParameters: true +BreakAfterReturnType: AllDefinitions +BreakBeforeBinaryOperators: NonAssignment +BreakBeforeBraces: Allman +BreakBeforeTernaryOperators: true +BreakStringLiterals: false +ColumnLimit: '100' +ContinuationIndentWidth: '4' +DerivePointerAlignment: false +IndentCaseLabels: true +IndentGotoLabels: false +IndentWidth: '4' +IndentWrappedFunctionNames: false +KeepEmptyLinesAtTheStartOfBlocks: false +MaxEmptyLinesToKeep: '2' +PointerAlignment: Right +ReflowComments: true +SortIncludes: false +SpaceAfterCStyleCast: false +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: ControlStatements +SpacesBeforeTrailingComments: '2' +SpacesInParens: Never +TabWidth: '4' +TypeNames: [DWORD] +UseTab: Never +WhitespaceSensitiveMacros: [_STRINGIFY] +--- +Language: C +--- +Language: Cpp diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..c1bca47 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +repos: + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: 'v20.1.0' + hooks: + - id: clang-format + files: \.[ch]$ + # preserve upstream formatting + exclude: ^(src/compat/compat-lz4\.[ch]|src/openvpn/ovpn_dco_(linux|win)\.h)$ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/790?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I40f6af10c5ee2f5aed4185d783fc622a2e3c19ff Gerrit-Change-Number: 790 Gerrit-PatchSet: 19 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: cron2 <ge...@gr...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-MessageType: merged |