Make sure LC_ALL=C is set in all shell scripts
Summary:
From the grep(1) documentation:
Within a bracket expression, a range expression consists of two
characters separated by a hyphen. It matches any single character that
sorts between the two characters, inclusive, using the locale's
collating sequence and character set. For example, in the default C
locale, [a-d] is equivalent to [abcd]. Many locales sort characters in
dictionary order, and in these locales [a-d] is typically not equivalent
to [abcd]; it might be equivalent to [aBbCcDd], for example. To obtain
the traditional interpretation of bracket expressions, you can use the C
locale by setting the LC_ALL environment variable to the value C.Backport of core PR13454
https://github.com/bitcoin/bitcoin/pull/13454/files
Test Plan:
Should return no error:
arc lint --everything
Edit a script to remove the export LC_ALL=C statement.
arc lint
Check the linter catches the error.
Edit a script to make the export LC_ALL=C statement being the seconf
statement by adding a line above: echo "Fail the linter".
arc lint
Check the linter catches the error.
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D3964