From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.12312.1644509994196521918 for ; Thu, 10 Feb 2022 08:19:54 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=V8zfRNgA; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from localhost.localdomain (c-73-27-179-174.hsd1.fl.comcast.net [73.27.179.174]) by linux.microsoft.com (Postfix) with ESMTPSA id 091CE20B9156; Thu, 10 Feb 2022 08:19:52 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 091CE20B9156 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1644509993; bh=bB8kcmBUXZUCGVrnTOv8Pf1Is0o0g9HKX/hH30xOU8U=; h=From:To:Cc:Subject:Date:From; b=V8zfRNgARce/QBv9TxHFGhQkSZz8/VRmLLk1/BulYV/EJQ6njJkDoFNvvyy6TKVJ/ Is8KDeANRyy9WsdvwBDjcJzx2OtF/XDFvsP4rIp2hNQvDrOdKueiBmtjEhmoZhc6DN zDKY6ONIebYw1elVy8PaZO2Yz5xxrgqxH17hF4ek= From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Sean Brogan , Bret Barkelew Subject: [PATCH v1 1/1] .pytool/Plugin/UncrustifyCheck: Output file diffs by default Date: Thu, 10 Feb 2022 11:19:27 -0500 Message-Id: <20220210161927.1847-1-mikuback@linux.microsoft.com> X-Mailer: git-send-email 2.28.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3808 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/Un= crustifyCheck/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 config= uration options. "AuditOnly": False, # Don't fail the build if there are = errors. Just log them. "ConfigFilePath": "", # Custom path to an Uncrustify confi= g 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 t= he plugin on very large packages. "SkipGitExclusions": False # Don't exclude git ignored files an= d files in git submodules. } @@ -82,7 +82,7 @@ to be ignored. =20 ### `OutputFileDiffs` =20 -`Boolean` - Default is `False`. +`Boolean` - Default is `True`. =20 If `True`, output diffs of formatting changes into the test case log. Th= is is helpful to exactly understand what changes need to be made to the source code in order to fix a coding standard com= pliance 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 =3D False - self._output_file_diffs =3D False + self._output_file_diffs =3D True =20 if "AuditOnly" in self._package_config and self._package_config[= "AuditOnly"]: self._audit_only_mode =3D True =20 - if "OutputFileDiffs" in self._package_config and self._package_c= onfig["OutputFileDiffs"]: - self._output_file_diffs =3D True + if "OutputFileDiffs" in self._package_config and not self._packa= ge_config["OutputFileDiffs"]: + self._output_file_diffs =3D False =20 def _log_uncrustify_app_info(self) -> None: """ --=20 2.28.0.windows.1