curl-curl/.github/scripts/codespell.sh
Viktor Szakats b39c158e4a
scripts: fix shellcheck SC2046 warnings
Fix SC2046: "Quote this to prevent word splitting."
Ref: https://www.shellcheck.net/wiki/SC2046

Also:
- shellcheck.sh: add `set -eu`.
- shellcheck.sh, yamlcheck.sh: always run from repo root.
- pass `--` before passing the list of files, where missing.
- badwords.pl, cleancmd.pl: rework to accept `git ls-files` arguments.
  Requires Perl 5.22+ (2015-Jun-01) on Windows.
  Ref: https://perldoc.perl.org/functions/open
- INTERNALS.md: require Perl 5.22 on Windows.
- spacecheck.pl: formatting.
- GHA/http3-linux: rework command to avoid SC2046.
- stop suppressing SC2046 warnings.

The yamlcheck.sh issue reported-by: Stanislav Fort (Aisle Research)
Ref: 20251109163515_6eb31da3-deb2-4f4d-8327-935904f27da5

Closes #19432
2025-11-10 14:21:35 +01:00

20 lines
435 B
Bash
Executable File

#!/bin/sh
# Copyright (C) Viktor Szakats
#
# SPDX-License-Identifier: curl
set -eu
cd "$(dirname "${0}")"/../..
git ls-files -z | xargs -0 -r \
codespell \
--skip '.github/scripts/pyspelling.words' \
--skip '.github/scripts/typos.toml' \
--skip 'docs/THANKS' \
--skip 'packages/*' \
--skip 'scripts/wcurl' \
--ignore-regex '.*spellchecker:disable-line' \
--ignore-words '.github/scripts/codespell-ignore.words' \
--