mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 16:20:52 +00:00
Docgen: Re-colourise jsduck warnings.
When jsduck is executed in a subshell (as we do, to catch output) it disables the color output. It should have a --color flag, but it doesn't have that, so manually colourise for now. Change-Id: I1f8da523b6b4fc1fc6965f751395f8af497b13b5
This commit is contained in:
parent
e47ed7309b
commit
36fb75d6b1
|
@ -22,7 +22,9 @@ ec=$?
|
||||||
rm eg-iframe.html
|
rm eg-iframe.html
|
||||||
cd - > /dev/null
|
cd - > /dev/null
|
||||||
|
|
||||||
echo -e "$warnings"
|
# Re-colorize
|
||||||
|
NORMAL=$(tput sgr0); YELLOW=$(tput setaf 3); MEGANTA=$(tput setaf 5)
|
||||||
|
echo "$warnings" | perl -pe "s|^([^ ]+) ([^ ]+) (.*)$|${YELLOW}\1 ${MEGANTA}\2${NORMAL} \3|"
|
||||||
|
|
||||||
# JSDuck doesn't exit with an error code if there are warnings
|
# JSDuck doesn't exit with an error code if there are warnings
|
||||||
# (only when there are fatal errors). We fixed all warnings
|
# (only when there are fatal errors). We fixed all warnings
|
||||||
|
|
Loading…
Reference in a new issue