From: "Rebecca Cran" <quic_rcran@quicinc.com>
To: <devel@edk2.groups.io>, <mikuback@linux.microsoft.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
Sean Brogan <sean.brogan@microsoft.com>,
"Bret Barkelew" <Bret.Barkelew@microsoft.com>
Subject: Re: [edk2-devel] [PATCH v1 1/1] .pytool/Plugin/UncrustifyCheck: Output file diffs by default
Date: Wed, 23 Feb 2022 10:48:42 -0700 [thread overview]
Message-ID: <7ab3cb92-85e1-c8ec-fc4e-20ae84a65c2f@quicinc.com> (raw)
In-Reply-To: <20220210161927.1847-1-mikuback@linux.microsoft.com>
This doesn't appear to work. If I change
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c to introduce an error,
then I get the following output (with verbose mode):
INFO - ------------------------------------------------
INFO - --------------Cmd Output Finished---------------
INFO - --------- Running Time (mm:ss): 00:07 ----------
INFO - ----------- Return Code: 0x00000000 ------------
INFO - ------------------------------------------------
INFO - Uncrustify executed against 1035 files in MdeModulePkg in 7.67
seconds.
INFO - Calculating file diffs. This might take a while...
ERROR - .../edk2/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c
ERROR - --->Test Failed: Uncrustify Coding Standard Test NO-TARGET
returned 1
PROGRESS - --Running MdeModulePkg: Spell Check Test NO-TARGET --
So it's seeing that _output_file_diffs is True, but it appears that
there aren't any formatted_files?
--
Rebecca Cran
On 2/10/22 09:19, Michael Kubacki wrote:
> From: Michael Kubacki<michael.kubacki@microsoft.com>
>
> 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>
> ---
> .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:
> """
next prev parent reply other threads:[~2022-02-23 17:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-10 16:19 [PATCH v1 1/1] .pytool/Plugin/UncrustifyCheck: Output file diffs by default Michael Kubacki
2022-02-10 16:44 ` Michael D Kinney
2022-02-10 16:47 ` [edk2-devel] " Rebecca Cran
2022-02-23 17:48 ` Rebecca Cran [this message]
2022-02-25 21:18 ` Michael Kubacki
2022-04-05 14:31 ` Rebecca Cran
2022-04-05 14:46 ` Michael Kubacki
2022-04-05 14:52 ` Rebecca Cran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7ab3cb92-85e1-c8ec-fc4e-20ae84a65c2f@quicinc.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox