Small documentation fixes
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
7c42009ddd
commit
4b69b94bba
|
@ -249,12 +249,12 @@ Strings and formatting
|
|||
------------------------
|
||||
|
||||
- Avoid using locale dependent functions if possible. You can use the provided
|
||||
[`lint-locale-dependence.sh`](/contrib/devtools/lint-locale-dependence.sh)
|
||||
to check for accidental use of locale dependent functions.
|
||||
[`lint-locale-dependence.sh`](../test/lint/lint-locale-dependence.sh)
|
||||
to check for accidental use of locale-dependent functions.
|
||||
|
||||
- *Rationale*: Unnecessary locale dependence can cause bugs that are very tricky to isolate and fix.
|
||||
|
||||
- These functions are known to be locale dependent:
|
||||
- These functions are known to be locale-dependent:
|
||||
`alphasort`, `asctime`, `asprintf`, `atof`, `atoi`, `atol`, `atoll`, `atoq`,
|
||||
`btowc`, `ctime`, `dprintf`, `fgetwc`, `fgetws`, `fprintf`, `fputwc`,
|
||||
`fputws`, `fscanf`, `fwprintf`, `getdate`, `getwc`, `getwchar`, `isalnum`,
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# This script runs all contrib/devtools/lint-*.sh files, and fails if any exit
|
||||
# with a non-zero status code.
|
||||
|
||||
# This script is intentionally locale dependent by not setting "export LC_ALL=C"
|
||||
# This script is intentionally locale-dependent by not setting "export LC_ALL=C".
|
||||
# in order to allow for the executed lint scripts to opt in or opt out of locale
|
||||
# dependence themselves.
|
||||
|
||||
|
|
|
@ -221,7 +221,7 @@ for LOCALE_DEPENDENT_FUNCTION in "${LOCALE_DEPENDENT_FUNCTIONS[@]}"; do
|
|||
done
|
||||
if [[ ${EXIT_CODE} != 0 ]]; then
|
||||
echo "Unnecessary locale dependence can cause bugs that are very"
|
||||
echo "tricky to isolate and fix. Please avoid using locale dependent"
|
||||
echo "tricky to isolate and fix. Please avoid using locale-dependent"
|
||||
echo "functions if possible."
|
||||
echo
|
||||
echo "Advice not applicable in this specific case? Add an exception"
|
||||
|
|
|
@ -13,7 +13,7 @@ export LC_ALL=C
|
|||
|
||||
EXIT_CODE=0
|
||||
for SHELL_SCRIPT in $(git ls-files -- "*.sh" | grep -vE "src/(secp256k1|univalue)/"); do
|
||||
if grep -q "# This script is intentionally locale dependent by not setting \"export LC_ALL=C\"" "${SHELL_SCRIPT}"; then
|
||||
if grep -q "# This script is intentionally locale-dependent by not setting \"export LC_ALL=C\"." "${SHELL_SCRIPT}"; then
|
||||
continue
|
||||
fi
|
||||
FIRST_NON_COMMENT_LINE=$(grep -vE '^(#.*)?$' "${SHELL_SCRIPT}" | head -1)
|
||||
|
|
Loading…
Reference in New Issue