Closed bernhardkaindl closed 9 months ago
Hi @bernhardkaindl san,
Regarding your suggestion of pretty print suppression, we have created a PR that implements the core part here.
I'll close this PR once. However, if you think it would be better to make additional modifications, please re-create the PR with the modified content after applying the above PR.
This PR was well done, the content is not to be denied.
I think I found the issue why my
mypy
messages in #115 are truncated very early:I've
pretty = true
in my existingmypy
configuration for nicer output to the terminal.But when script.sh pipes the
mypy
output toreviewdog
, the enabledpretty
option causesmypy
to wrap the output at column 79 (see the examples below):mypy
withpretty = true
in the configuration file, with output directly to the terminal's tty:mypy
withpretty = true
in the configuration file, with piped to a command like forreviewdog
inscript.sh
:Of course, the truncation is even worse with the
--show-absolute-path
thatscript.sh
adds.Is the
--show-absolute-path
really needed?Here, adding
--no-pretty
helps to get the expected non-truncated error message in a single line:Not knowing that
--pretty
causes this, in my experiments to diagnose it, I had also tried adding--pretty
toaction-mypy.with.mypy_flags
, which of course we should override to prevent users from messing up the output format ofmypy
that the action relies on.Good, overriding incompatible
mypy
flags should work just fine this way.Thus, move
${INPUT_MYPY_FLAGS}
to be first on the command line and override any incompatible flags fromaction-mypy.with.mypy_flags
with them:--no-pretty
,--show-column-numbers
and--show-absolute-path
.I hope that this fixes the formatting issues - to be tested.
In the 2nd commit I also attempt to use
reviewdog -tee
to hopefully causereviewdog
to sendmypy
warnings to stdout as well get them into the log of the GitHub action workflow as well.Related issue
related to #115
Fix or Add/Remove in this PR:
Test/動作確認
With one bigger commit to fix installing types (needed after
set -euvx
was added) it looks good now (the new comments at the end are good):https://github.com/xenserver-next/xen-api/pull/6