]> www.infradead.org Git - users/dedekind/aiaiai.git/commitdiff
test-patchset: add [no] options for each checker
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 24 Sep 2014 18:23:15 +0000 (11:23 -0700)
committerJacob Keller <jacob.e.keller@intel.com>
Wed, 24 Sep 2014 18:25:19 +0000 (11:25 -0700)
Also, enable checkpatch.pl by default unless otherwise disabled. This
fixes a compatibility regression introduced by 33c41203f0c9
("aiaiai-test-patchset: make checkpatch optional like other checkers")
as well as provides disable options for once aiaiai-test-patchset
supports a configuration file.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
aiaiai-test-patchset
email/aiaiai-email-test-patchset

index b3ab3f5a17021fedbb370be9f5aeaff3fa199cb2..dee9f80be2a6eb6afdca3109dd76a2836f83ccde 100755 (executable)
@@ -64,6 +64,13 @@ By default, $PROG assumes that defconfigs are part of the
 kernel tree, unless --confdir option is specified, in which case the defconfig
 files will be searched for only in the specified directory.
 
+Several static checking utilities can be enabled to provide enhanced
+information, if desired. These include sparse, smatch, cppcheck, and
+coccinelle. In addition scripts/checkpatch.pl is run if found in the project
+tree. You can disable a checker with --no[checker] or enable it with
+--[checker]. The last provided option on the command line wins, and supersedes
+other settings.
+
 Options:
   -j, --jobs=N           allow to run N jobs simultaneously (default is 1);
   -c, --commit-id=ID     the commit id to test against (default is the head of
@@ -83,11 +90,11 @@ Options:
                          stand-alone defconfig files instead;
   -p, --preserve         preserve all the temporary files - do not clean up;
       --bisectability    test bisectability;
-      --sparse           check with sparse while building;
-      --smatch           check with smatch while building;
-      --cppcheck         check with cppcheck while building;
-      --coccinelle       check with coccinelle (spatch) while building;
-      --checkpatch       run scripts/checkpatch.pl, if found in the project;
+      --[no]sparse       check with sparse while building;
+      --[no]smatch       check with smatch while building;
+      --[no]cppcheck     check with cppcheck while building;
+      --[no]coccinelle   check with coccinelle (spatch) while building;
+      --[no]checkpatch   run scripts/checkpatch.pl, if found in the project;
   -Q  --quick-fixes=F    sometimes it is necessary to carry out-of-tree patches
                          like quick build fixes and this option allows to pass
                          an mbox file with quick fixes which will be applied
@@ -275,7 +282,7 @@ sparse=
 smatch=
 cppcheck=
 coccinelle=
-checkpatch=
+checkpatch="yes" # Keep enabled by default for backwards compatibility
 quick_fixes=
 targets="all"
 keywords=
@@ -332,6 +339,24 @@ while true; do
                coccinelle="yes"
                program_required "spatch" "Usually Linux distribution provide a 'spatch' or 'coccinelle' package"
                ;;
+       --checkpatch)
+               checkpatch="yes"
+               ;;
+       --nosparse)
+               sparse=
+               ;;
+       --nosmatch)
+               smatch=
+               ;;
+       --nocppcheck)
+               cppcheck=
+               ;;
+       --nococcinelle)
+               coccinelle=
+               ;;
+       --nocheckpatch)
+               checkpatch=
+               ;;
        -Q|--quick-fixes)
                quick_fixes="$(opt_check_read "$1" "$2")"
                shift
@@ -340,9 +365,6 @@ while true; do
                targets="$2"
                shift
                ;;
-       --checkpatch)
-               checkpatch="yes"
-               ;;
        -K|--keywords)
                keywords="$(opt_check_read "$1" "$2")"
                shift
index dba6b0c355ff2c162558e10d31803aa0c9b80a32..8270e04cc069a9cc1d1450aad951526ad5a94f8a 100755 (executable)
@@ -330,13 +330,13 @@ sparse=
 smatch=
 cppcheck=
 coccinelle=
-checkpatch=
+checkpatch= # Note, checkpatch is enabled by default
 [ "$pcfg_bisectability" != "1" ] || bisectability="--bisectability"
 [ "$pcfg_sparse" != "1" ] || sparse="--sparse"
 [ "$pcfg_smatch" != "1" ] || smatch="--smatch"
 [ "$pcfg_cppcheck" != "1" ] || cppcheck="--cppcheck"
 [ "$pcfg_coccinelle" != "1" ] || coccinelle="--coccinelle"
-[ "$pcfg_checkpatch" != "1" ] || checkpatch="--checkpatch"
+[ "$pcfg_checkpatch" = "1" ] || checkpatch="--nocheckpatch"
 
 # Create the Cc list for replies that we'll be sending
 if [ "$pcfg_reply_to_all" = "1" ]; then