annotate .shellcheckrc @ 809:6cf3e1021862

common.subr: Change handling of internal errors. They now - return 64 or 70 - print always an error message to stderr - set the given option variable to the null value - unset OPTARG in *every* case. This is independent whether the short options start with an `:' character or not.
author Franz Glasner <fzglas.hg@dom66.de>
date Tue, 05 Nov 2024 18:42:40 +0100
parents e18cc5fe828c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
542
1e46e254366e Use a new .shellcheckrc file for common configuration settings for shellcheck.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
1 #
1e46e254366e Use a new .shellcheckrc file for common configuration settings for shellcheck.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
2 # See: shellcheck(1)
1e46e254366e Use a new .shellcheckrc file for common configuration settings for shellcheck.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
3 #
574
31b5c10ae1d4 .shellcheckrc: Comment on reasons: FreeBSD has this non-required features in POSIX shells
Franz Glasner <fzglas.hg@dom66.de>
parents: 542
diff changeset
4 # To see a list of
542
1e46e254366e Use a new .shellcheckrc file for common configuration settings for shellcheck.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
5 # See: https://www.shellcheck.net/wiki/
574
31b5c10ae1d4 .shellcheckrc: Comment on reasons: FreeBSD has this non-required features in POSIX shells
Franz Glasner <fzglas.hg@dom66.de>
parents: 542
diff changeset
6 #
31b5c10ae1d4 .shellcheckrc: Comment on reasons: FreeBSD has this non-required features in POSIX shells
Franz Glasner <fzglas.hg@dom66.de>
parents: 542
diff changeset
7 # This is a customization for FreeBSD:
713
31023b6bf315 .shellcheckrc: FIX: typo in comment
Franz Glasner <fzglas.hg@dom66.de>
parents: 665
diff changeset
8 # in FreeBSD there is $'...', local; and tests with logical operators work
574
31b5c10ae1d4 .shellcheckrc: Comment on reasons: FreeBSD has this non-required features in POSIX shells
Franz Glasner <fzglas.hg@dom66.de>
parents: 542
diff changeset
9 # as expected.
31b5c10ae1d4 .shellcheckrc: Comment on reasons: FreeBSD has this non-required features in POSIX shells
Franz Glasner <fzglas.hg@dom66.de>
parents: 542
diff changeset
10 #
542
1e46e254366e Use a new .shellcheckrc file for common configuration settings for shellcheck.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
11
1e46e254366e Use a new .shellcheckrc file for common configuration settings for shellcheck.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
12 source-path=SCRIPTDIR/../share/local-bsdtools
1e46e254366e Use a new .shellcheckrc file for common configuration settings for shellcheck.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
13 source-path=SCRIPTDIR
665
24129dd789f0 Shellcheck for rc-scripts
Franz Glasner <fzglas.hg@dom66.de>
parents: 574
diff changeset
14 source-path=/etc
714
d016ac770a71 .shellcheckrc: Add the configuration directory in /usr/local/etc/local-bsdtools to Shellcheck's source-path
Franz Glasner <fzglas.hg@dom66.de>
parents: 713
diff changeset
15 source-path=/usr/local/etc/local-bsdtools
542
1e46e254366e Use a new .shellcheckrc file for common configuration settings for shellcheck.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
16 external-sources=true
1e46e254366e Use a new .shellcheckrc file for common configuration settings for shellcheck.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
17
1e46e254366e Use a new .shellcheckrc file for common configuration settings for shellcheck.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
18 # $/${} is unnecessary on arithmetic variables
1e46e254366e Use a new .shellcheckrc file for common configuration settings for shellcheck.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
19 disable=SC2004
1e46e254366e Use a new .shellcheckrc file for common configuration settings for shellcheck.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
20 # Prefer [ p ] && [ q ] as [ p -a q ] is not well-defined
1e46e254366e Use a new .shellcheckrc file for common configuration settings for shellcheck.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
21 disable=SC2166
1e46e254366e Use a new .shellcheckrc file for common configuration settings for shellcheck.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
22 # In POSIX sh, $'..' is undefined
1e46e254366e Use a new .shellcheckrc file for common configuration settings for shellcheck.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
23 disable=SC3003
749
e8eb5e7ceb37 farray.sh: Implement binary lexicographical search in "farray_binsearch()".
Franz Glasner <fzglas.hg@dom66.de>
parents: 714
diff changeset
24 # In POSIX sh, lexicographical \< is undefined.
e8eb5e7ceb37 farray.sh: Implement binary lexicographical search in "farray_binsearch()".
Franz Glasner <fzglas.hg@dom66.de>
parents: 714
diff changeset
25 disable=SC3012
542
1e46e254366e Use a new .shellcheckrc file for common configuration settings for shellcheck.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
26 # In POSIX sh, local is undefined
1e46e254366e Use a new .shellcheckrc file for common configuration settings for shellcheck.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
27 disable=SC3043
756
33df05108ba1 farray.sh: New implementation alists: searching is done using a binary search now while preserving insertion order.
Franz Glasner <fzglas.hg@dom66.de>
parents: 749
diff changeset
28 # ;& is non-standard
33df05108ba1 farray.sh: New implementation alists: searching is done using a binary search now while preserving insertion order.
Franz Glasner <fzglas.hg@dom66.de>
parents: 749
diff changeset
29 disable=SC2127
805
e18cc5fe828c .shellcheckrc: disable SC2214 because is fires for all long options.
Franz Glasner <fzglas.hg@dom66.de>
parents: 756
diff changeset
30 # This case is not specified by getopts (we have long options also)
e18cc5fe828c .shellcheckrc: disable SC2214 because is fires for all long options.
Franz Glasner <fzglas.hg@dom66.de>
parents: 756
diff changeset
31 disable=SC2214
542
1e46e254366e Use a new .shellcheckrc file for common configuration settings for shellcheck.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
32
1e46e254366e Use a new .shellcheckrc file for common configuration settings for shellcheck.
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
33 enable=avoid-nullary-conditions