Checking for All Warnings and Errors
The command line in following example requests W3 error checking, which includes parsing errors, syntax errors, upgrade, portability, and performance warnings.
procheck -W3 foo.tcl
The feedback from the command line with W3 specified looks similar to this:
TclPro Checker -- Version 1.4.0
Copyright (C) Ajuba Solutions Inc. 1998-2000. All rights reserved.
This product is registered to: Sinking Ships, Ltd.
scanning: /home/kenj/test/foo.tcl
checking: /home/kenj/test/foo.tcl
foo.tcl:1 (warnVarRef) variable reference used where variable name expected
set $y 3
^
foo.tcl:2 (warnExpr) use curly braces to avoid double substitution
expr $y + 5
^
foo.tcl:3 (numArgs) wrong # args
set x y z
^
foo.tcl:5 (noScript) missing a script after "if"
if {$x > 6}
^
foo.tcl:6 (warnUndefProc) undefined procedure:
puts out "world"
{
^
foo.tcl:10 (argAfterArgs) argument specified after "args"
proc foo {args bar} {
^
foo.tcl:14 (nonDefAfterDef) non-default arg specified after default
proc p {{a 0} b} {
^
http://www.ajubasolutions.com Voice: (650) 210-0100 Fax: (650) 210-0101 support@ajubasolutions.com |