From 41c622523de353a136fac4ecd3335b05e35fd411 Mon Sep 17 00:00:00 2001 From: Vivian Nowka-Keane Date: Wed, 16 Aug 2023 14:15:17 -0700 Subject: .pytool: Add cpp support to uncrustify plugin Modified the uncrustify config to apply cpp specific formatting rules. Modified uncrustify check to include *.cpp files. Cc: Sean Brogan Cc: Michael Kubacki Cc: Michael D Kinney Cc: Liming Gao Signed-off-by: Vivian Nowka-Keane Reviewed-by: Michael Kubacki Reviewed-by: Michael D Kinney --- .pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py | 2 +- .pytool/Plugin/UncrustifyCheck/uncrustify.cfg | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py b/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py index 8978ffc443..17f77b48d9 100644 --- a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py +++ b/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py @@ -110,7 +110,7 @@ class UncrustifyCheck(ICiBuildPlugin): # A package can add any additional paths with "AdditionalIncludePaths" # A package can remove any of these paths with "IgnoreStandardPaths" # - STANDARD_PLUGIN_DEFINED_PATHS = ("*.c", "*.h") + STANDARD_PLUGIN_DEFINED_PATHS = ("*.c", "*.h", "*.cpp") # # The Uncrustify application path should set in this environment variable diff --git a/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg b/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg index 8506c33337..d7e86a6e57 100644 --- a/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg +++ b/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg @@ -215,7 +215,7 @@ indent_braces = false indent_braces_no_class = false indent_braces_no_func = true indent_braces_no_struct = false -indent_class = false +indent_class = true indent_class_colon = false indent_cmt_with_tabs = false # Whether to indent comments that are not at a brace level with tabs on # a tabstop. Requires indent_with_tabs=2. If false, will use spaces. @@ -223,7 +223,7 @@ indent_col1_comment = true indent_col1_multi_string_literal= true indent_comma_paren = true indent_else_if = true -indent_extern = false +indent_extern = true indent_first_bool_expr = true indent_func_def_param_paren_pos_threshold = 0 -- cgit v1.2.3