aboutsummaryrefslogtreecommitdiff
path: root/lint/checkbashisms.1
diff options
context:
space:
mode:
Diffstat (limited to 'lint/checkbashisms.1')
-rw-r--r--lint/checkbashisms.168
1 files changed, 68 insertions, 0 deletions
diff --git a/lint/checkbashisms.1 b/lint/checkbashisms.1
new file mode 100644
index 000000000..6df5f3c78
--- /dev/null
+++ b/lint/checkbashisms.1
@@ -0,0 +1,68 @@
1.TH CHECKBASHISMS 1 "Debian Utilities" "DEBIAN" \" -*- nroff -*-
2.SH NAME
3checkbashisms \- check for bashisms in /bin/sh scripts
4.SH SYNOPSIS
5\fBcheckbashisms\fR \fIscript\fR ...
6.br
7\fBcheckbashisms \-\-help\fR|\fB\-\-version\fR
8.SH DESCRIPTION
9\fBcheckbashisms\fR, based on one of the checks from the \fBlintian\fR
10system, performs basic checks on \fI/bin/sh\fR shell scripts for the
11possible presence of bashisms. It takes the names of the shell
12scripts on the command line, and outputs warnings if possible bashisms
13are detected.
14.PP
15Note that the definition of a bashism in this context roughly equates
16to "a shell feature that is not required to be supported by POSIX"; this
17means that some issues flagged may be permitted under optional sections
18of POSIX, such as XSI or User Portability.
19.PP
20In cases where POSIX and Debian Policy disagree, \fBcheckbashisms\fR by
21default allows extensions permitted by Policy but may also provide
22options for stricter checking.
23.SH OPTIONS
24.TP
25.BR \-\-help ", " \-h
26Show a summary of options.
27.TP
28.BR \-\-newline ", " \-n
29Check for "\fBecho \-n\fR" usage (non POSIX but required by Debian Policy 10.4.)
30.TP
31.BR \-\-posix ", " \-p
32Check for issues which are non POSIX but required to be supported by Debian
33Policy 10.4 (implies \fB\-n\fR).
34.TP
35.BR \-\-force ", " \-f
36Force each script to be checked, even if it would normally not be (for
37instance, it has a bash or non POSIX shell shebang or appears to be a
38shell wrapper).
39.TP
40.BR \-\-extra ", " \-x
41Highlight lines which, whilst they do not contain bashisms, may be
42useful in determining whether a particular issue is a false positive
43which may be ignored.
44For example, the use of "\fB$BASH_ENV\fR" may be preceded by checking
45whether "\fB$BASH\fR" is set.
46.TP
47.BR \-\-version ", " \-v
48Show version and copyright information.
49.SH "EXIT VALUES"
50The exit value will be 0 if no possible bashisms or other problems
51were detected. Otherwise it will be the sum of the following error
52values:
53.TP
541
55A possible bashism was detected.
56.TP
572
58A file was skipped for some reason, for example, because it was
59unreadable or not found. The warning message will give details.
60.TP
614
62No bashisms were detected in a bash script.
63.SH "SEE ALSO"
64.BR lintian (1)
65.SH AUTHOR
66\fBcheckbashisms\fR was originally written as a shell script by Yann Dirson
67<\fIdirson@debian.org\fR> and rewritten in Perl with many more features by
68Julian Gilbey <\fIjdg@debian.org\fR>.