bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ShellCheck reports error in run_parser_all.sh (patch)


From: Gavin Smith
Subject: Re: ShellCheck reports error in run_parser_all.sh (patch)
Date: Tue, 16 Feb 2021 16:00:51 +0000
User-agent: Mutt/1.9.4 (2018-02-28)

On Tue, Feb 16, 2021 at 10:30:44AM +0100, Vitezslav Crhonek wrote:
> Hi,
> 
> ShellCheck reports error [1] in tp/tests/run_parser_all.sh script.
> 'continue' is used there to exit a function.
> 
> I don't consider it to be a big deal but it would be nice to have it
> fixed at least for the sake of clean code. Simple patch attached.
> 
> The issue has been originally reported by yeah_wang at [2].

I think the code was originally supposed to continue a loop in
the code that that calls the function.  I think changing it to
"return 1" would be the sensible change to make sure this happens:
nothing special happens if 2 is returned instead.

> 
> Best regards
> Vita
> 
> [1] https://github.com/koalaman/shellcheck/wiki/SC2104
> [2] https://bugzilla.redhat.com/show_bug.cgi?id=1921666
> 
> -- 
> Vitezslav Crhonek
> Software Engineer
> Red Hat

> diff --git a/tp/tests/run_parser_all.sh b/tp/tests/run_parser_all.sh
> index f424bbb421..8069d466f6 100755
> --- a/tp/tests/run_parser_all.sh
> +++ b/tp/tests/run_parser_all.sh
> @@ -46,7 +46,7 @@ check_latex2html_and_tex4ht ()
>        if echo "$remaining" | grep '[-]init mediawiki.pm' >/dev/null; then
>         if test "$no_html2wiki" = 'yes' ; then
>           echo "S: (no html2wiki) $current"
> -         continue 2
> +         return 2
>         fi
>        fi
>      fi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]