Lines Matching +full:before +full:- +full:script
1 <!--
4 SPDX-License-Identifier: curl
5 -->
18 `-W[file]` skip that file and exclude it from being checked. Helpful
21 `-D[dir]` directory name to prepend to filenames when accessing them.
23 `-h` shows the help output, that also lists all recognized warnings
28 The script is an effort to detect the most common mistakes and syntax mistakes
29 that contributors make before they get accustomed to our code style. Heck,
30 many of us regulars do the mistakes too and this script helps us keep the code
33 checksrc.pl -h
35 Lists how to use the script and it lists all existing warnings it has and
39 - `ASSIGNWITHINCONDITION`: Assignment within a conditional expression. The
42 - `ASTERISKNOSPACE`: A pointer was declared like `char* name` instead of the
46 - `ASTERISKSPACE`: A pointer was declared like `char * name` instead of the
50 - `BADCOMMAND`: There is a bad `checksrc` instruction in the code. See the
53 - `BANNEDFUNC`: A banned function was used. The functions sprintf, vsprintf,
56 - `BRACEELSE`: '} else' on the same line. The else is supposed to be on the
59 - `BRACEPOS`: wrong position for an open brace (`{`).
61 - `BRACEWHILE`: more than once space between end brace and while keyword
63 - `COMMANOSPACE`: a comma without following space
65 - `COPYRIGHT`: the file is missing a copyright statement
67 - `CPPCOMMENTS`: `//` comment detected, that is not C89 compliant
69 - `DOBRACE`: only use one space after do before open brace
71 - `EMPTYLINEBRACE`: found empty line before open brace
73 - `EQUALSNOSPACE`: no space after `=` sign
75 - `EQUALSNULL`: comparison with `== NULL` used in if/while. We use `!var`.
77 - `EXCLAMATIONSPACE`: space found after exclamations mark
79 - `FOPENMODE`: `fopen()` needs a macro for the mode string, use it
81 - `INDENTATION`: detected a wrong start column for code. Note that this
85 - `LONGLINE`: A line is longer than 79 columns.
87 - `MULTISPACE`: Multiple spaces were found where only one should be used.
89 - `NOSPACEEQUALS`: An equals sign was found without preceding space. We prefer
92 - `NOTEQUALSZERO`: check found using `!= 0`. We use plain `if(var)`.
94 - `ONELINECONDITION`: do not put the conditional block on the same line as `if()`
96 - `OPENCOMMENT`: File ended with a comment (`/*`) still "open".
98 - `PARENBRACE`: `){` was used without sufficient space in between.
100 - `RETURNNOSPACE`: `return` was used without space between the keyword and the
103 - `SEMINOSPACE`: There was no space (or newline) following a semicolon.
105 - `SIZEOFNOPAREN`: Found use of sizeof without parentheses. We prefer
108 - `SNPRINTF` - Found use of `snprintf()`. Since we use an internal replacement
111 - `SPACEAFTERPAREN`: there was a space after open parenthesis, `( text`.
113 - `SPACEBEFORECLOSE`: there was a space before a close parenthesis, `text )`.
115 - `SPACEBEFORECOMMA`: there was a space before a comma, `one , two`.
117 - `SPACEBEFOREPAREN`: there was a space before an open parenthesis, `if (`,
120 - `SPACESEMICOLON`: there was a space before semicolon, ` ;`.
122 - `TABS`: TAB characters are not allowed
124 - `TRAILINGSPACE`: Trailing whitespace on the line
126 - `TYPEDEFSTRUCT`: we frown upon (most) typedefed structs
128 - `UNUSEDIGNORE`: a `checksrc` inlined warning ignore was asked for but not
141 - `COPYRIGHTYEAR`: the current changeset has not updated the copyright year in
144 - `STRERROR`: use of banned function strerror()
146 - `STDERR`: use of banned variable `stderr`
167 This ignores the warning for overly long lines until it is re-enabled with:
171 If the enabling is not performed before the end of the file, it is enabled