From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by mx.groups.io with SMTP id smtpd.web12.12962.1644511624513573050 for ; Thu, 10 Feb 2022 08:47:04 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=WBOelBil; spf=pass (domain: quicinc.com, ip: 199.106.114.39, mailfrom: quic_rcran@quicinc.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1644511624; x=1676047624; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=VYWB4EGDth+AIB3BSSN/rmYdFeL4bcPZRdm+5+80gvM=; b=WBOelBil1kNUoDqa/IDWwhCFtkwRKYXbC/53k5nEMAqeuWLhJ02DBbCZ 1orWR/uDlpvOoeD3xyVLU6V8moLCch2CFCbczeojstM2zG8W/NctHWhHz kVTSJc010XZcoz8nBSWwY9my9rBimXs/JpW/mGZj5Wt1c+N4hUvAx8c72 8=; Received: from unknown (HELO ironmsg03-sd.qualcomm.com) ([10.53.140.143]) by alexa-out-sd-02.qualcomm.com with ESMTP; 10 Feb 2022 08:47:03 -0800 X-QCInternal: smtphost Received: from nasanex01b.na.qualcomm.com ([10.46.141.250]) by ironmsg03-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 08:47:03 -0800 Received: from [10.110.65.100] (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Thu, 10 Feb 2022 08:47:02 -0800 Message-ID: Date: Thu, 10 Feb 2022 09:47:01 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [edk2-devel] [PATCH v1 1/1] .pytool/Plugin/UncrustifyCheck: Output file diffs by default To: , CC: Michael D Kinney , Liming Gao , Sean Brogan , Bret Barkelew References: <20220210161927.1847-1-mikuback@linux.microsoft.com> From: "Rebecca Cran" In-Reply-To: <20220210161927.1847-1-mikuback@linux.microsoft.com> Return-Path: quic_rcran@quicinc.com X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01b.na.qualcomm.com (10.46.141.250) Content-Language: en-US Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Thanks! Reviewed-by: Rebecca Cran -- Rebecca Cran On 2/10/22 09:19, Michael Kubacki wrote: > From: Michael Kubacki > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3808 > > Changes the default for the "OutputFileDiffs" configuration option > to "True" so the formatting suggestions detected by Uncrustify > will be output in the test case log. The diff is printed in unified > diff format. > > This was disabled by default during the initial enabling of > Uncrustify to reduce overall execution time of the plugin against > the codebase due to the large number of changes detected. > > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Sean Brogan > Cc: Bret Barkelew > Signed-off-by: Michael Kubacki > --- > .pytool/Plugin/UncrustifyCheck/Readme.md | 4 ++-- > .pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py | 6 +++--- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/.pytool/Plugin/UncrustifyCheck/Readme.md b/.pytool/Plugin/UncrustifyCheck/Readme.md > index bb263bcc87d7..0c46fd241a7a 100644 > --- a/.pytool/Plugin/UncrustifyCheck/Readme.md > +++ b/.pytool/Plugin/UncrustifyCheck/Readme.md > @@ -42,7 +42,7 @@ The plugin can be configured with a few optional configuration options. > "AuditOnly": False, # Don't fail the build if there are errors. Just log them. > "ConfigFilePath": "", # Custom path to an Uncrustify config file. > "IgnoreStandardPaths": [], # Standard Plugin defined paths that should be ignored. > - "OutputFileDiffs": False, # Output chunks of formatting diffs in the test case log. > + "OutputFileDiffs": True, # Output chunks of formatting diffs in the test case log. > # This can significantly slow down the plugin on very large packages. > "SkipGitExclusions": False # Don't exclude git ignored files and files in git submodules. > } > @@ -82,7 +82,7 @@ to be ignored. > > ### `OutputFileDiffs` > > -`Boolean` - Default is `False`. > +`Boolean` - Default is `True`. > > If `True`, output diffs of formatting changes into the test case log. This is helpful to exactly understand what changes > need to be made to the source code in order to fix a coding standard compliance issue. > diff --git a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py b/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py > index 6db8d1739a80..ea8396942b16 100644 > --- a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py > +++ b/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py > @@ -494,13 +494,13 @@ class UncrustifyCheck(ICiBuildPlugin): > Initializes options that influence test case output. > """ > self._audit_only_mode = False > - self._output_file_diffs = False > + self._output_file_diffs = True > > if "AuditOnly" in self._package_config and self._package_config["AuditOnly"]: > self._audit_only_mode = True > > - if "OutputFileDiffs" in self._package_config and self._package_config["OutputFileDiffs"]: > - self._output_file_diffs = True > + if "OutputFileDiffs" in self._package_config and not self._package_config["OutputFileDiffs"]: > + self._output_file_diffs = False > > def _log_uncrustify_app_info(self) -> None: > """