[libcamera-devel,2/2] clang-format: Update to reflect coding style
diff mbox series

Message ID 20210222032915.31452-2-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • [libcamera-devel,1/2] clang-format: Update to clang-format-7
Related show

Commit Message

Laurent Pinchart Feb. 22, 2021, 3:29 a.m. UTC
The libcamera coding style allows functions to be defined on a single
line only when they're inline. Update the clang-format configuration
accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 .clang-format | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kieran Bingham March 8, 2021, 11:46 a.m. UTC | #1
On 22/02/2021 03:29, Laurent Pinchart wrote:
> The libcamera coding style allows functions to be defined on a single
> line only when they're inline. Update the clang-format configuration
> accordingly.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>


Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>


> ---
>  .clang-format | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/.clang-format b/.clang-format
> index c561a8d9245b..8719683aa2c1 100644
> --- a/.clang-format
> +++ b/.clang-format
> @@ -20,7 +20,7 @@ AlignTrailingComments: false
>  AllowAllParametersOfDeclarationOnNextLine: false
>  AllowShortBlocksOnASingleLine: false
>  AllowShortCaseLabelsOnASingleLine: false
> -AllowShortFunctionsOnASingleLine: Inline
> +AllowShortFunctionsOnASingleLine: InlineOnly
>  AllowShortIfStatementsOnASingleLine: false
>  AllowShortLoopsOnASingleLine: false
>  AlwaysBreakAfterDefinitionReturnType: None
>

Patch
diff mbox series

diff --git a/.clang-format b/.clang-format
index c561a8d9245b..8719683aa2c1 100644
--- a/.clang-format
+++ b/.clang-format
@@ -20,7 +20,7 @@  AlignTrailingComments: false
 AllowAllParametersOfDeclarationOnNextLine: false
 AllowShortBlocksOnASingleLine: false
 AllowShortCaseLabelsOnASingleLine: false
-AllowShortFunctionsOnASingleLine: Inline
+AllowShortFunctionsOnASingleLine: InlineOnly
 AllowShortIfStatementsOnASingleLine: false
 AllowShortLoopsOnASingleLine: false
 AlwaysBreakAfterDefinitionReturnType: None