diff mbox series

[3/8] clang-format: ensure files end with newlines

Message ID 20240708092317.267915-4-karthik.188@gmail.com (mailing list archive)
State Superseded
Headers show
Series clang-format: add more rules and enable on CI | expand

Commit Message

karthik nayak July 8, 2024, 9:23 a.m. UTC
All our source files end with a newline, let's formalize in
'.clang-format'.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
---
 .clang-format | 3 +++
 1 file changed, 3 insertions(+)

Comments

Junio C Hamano July 8, 2024, 4:32 p.m. UTC | #1
Karthik Nayak <karthik.188@gmail.com> writes:

> All our source files end with a newline, let's formalize in
> '.clang-format'.

Makes sense.

>
> Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
> ---
>  .clang-format | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/.clang-format b/.clang-format
> index 803b274dd5..4c9751a9db 100644
> --- a/.clang-format
> +++ b/.clang-format
> @@ -106,6 +106,9 @@ IndentCaseLabels: false
>  # #endif
>  IndentPPDirectives: AfterHash
>  
> +# Insert a newline at end of file if missing
> +InsertNewlineAtEOF: true
> +
>  # Don't indent a function definition or declaration if it is wrapped after the
>  # type
>  IndentWrappedFunctionNames: false
diff mbox series

Patch

diff --git a/.clang-format b/.clang-format
index 803b274dd5..4c9751a9db 100644
--- a/.clang-format
+++ b/.clang-format
@@ -106,6 +106,9 @@  IndentCaseLabels: false
 # #endif
 IndentPPDirectives: AfterHash
 
+# Insert a newline at end of file if missing
+InsertNewlineAtEOF: true
+
 # Don't indent a function definition or declaration if it is wrapped after the
 # type
 IndentWrappedFunctionNames: false