]> git.proxmox.com Git - mirror_edk2.git/commitdiff
.pytool/Plugin/UncrustifyCheck: Output file diffs by default
authorMichael Kubacki <michael.kubacki@microsoft.com>
Thu, 10 Feb 2022 15:58:03 +0000 (10:58 -0500)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 8 Mar 2022 18:41:39 +0000 (18:41 +0000)
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 <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Rebecca Cran <quic_rcran@quicinc.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
.pytool/Plugin/UncrustifyCheck/Readme.md
.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py

index bb263bcc87d75bc8eda9c3db74d37866686b0645..0c46fd241a7a7127f4fd46319742dc68612b2c81 100644 (file)
@@ -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.\r
       "ConfigFilePath": "",         # Custom path to an Uncrustify config file.\r
       "IgnoreStandardPaths": [],    # Standard Plugin defined paths that should be ignored.\r
-      "OutputFileDiffs": False,     # Output chunks of formatting diffs in the test case log.\r
+      "OutputFileDiffs": True,      # Output chunks of formatting diffs in the test case log.\r
                                     # This can significantly slow down the plugin on very large packages.\r
       "SkipGitExclusions": False    # Don't exclude git ignored files and files in git submodules.\r
   }\r
@@ -82,7 +82,7 @@ to be ignored.
 \r
 ### `OutputFileDiffs`\r
 \r
-`Boolean` - Default is `False`.\r
+`Boolean` - Default is `True`.\r
 \r
 If `True`, output diffs of formatting changes into the test case log. This is helpful to exactly understand what changes\r
 need to be made to the source code in order to fix a coding standard compliance issue.\r
index 6db8d1739a80455a39e55d1d6f9f4650f44d1f73..ea8396942b16a461e0b8b8d9926bec664b250a81 100644 (file)
@@ -494,13 +494,13 @@ class UncrustifyCheck(ICiBuildPlugin):
         Initializes options that influence test case output.\r
         """\r
         self._audit_only_mode = False\r
-        self._output_file_diffs = False\r
+        self._output_file_diffs = True\r
 \r
         if "AuditOnly" in self._package_config and self._package_config["AuditOnly"]:\r
             self._audit_only_mode = True\r
 \r
-        if "OutputFileDiffs" in self._package_config and self._package_config["OutputFileDiffs"]:\r
-            self._output_file_diffs = True\r
+        if "OutputFileDiffs" in self._package_config and not self._package_config["OutputFileDiffs"]:\r
+            self._output_file_diffs = False\r
 \r
     def _log_uncrustify_app_info(self) -> None:\r
         """\r