TclPro Checker Message Descriptions in Detail
This section provides detailed descriptions of the code checker messages.
argAfterArgs
- Message String: Argument specified after "args"
- Category: Error
- Explanation: An argument has been specified after the args keyword in a procedure argument list. The args argument is treated like a normal parameter and does not collect the remaining parameters into a single list.
argsNotDefault
- Message String: "args" cannot be defaulted
- Category: Error
- Explanation: The args keyword cannot be initialized to contain a default value. Although the Tcl interpreter does not complain about this usage, the default value is ignored.
badBoolean
- Message String: Invalid Boolean value
- Category: Error
- Explanation: The command expects the string to specify a Boolean value. The string can be "1", "0", "true", "false", "yes", "no", "on", or "off" in any unique abbreviation and case.
badByteNum
- Message String: Invalid number, should be between 0 and 255
- Category: Error
- Explanation: The type should be a integer between 0 and 255.
badColorFormat
- Message String: Invalid color name
- Category: Error
- Explanation: The command expects the string to specify a color value. The string can be any of the following forms:
- colorname can be any of the valid textual names for a color defined in the server's color database file, such as "red" or "Bisque". If the color name is not a Tcl defined color, a warning is flagged stating that the color may not be portable across all platforms; see nonPortColor. The RGB characters represent hexadecimal digits that specify the red, green, and blue intensities of the color.
badColormap
- Message String: Invalid colormap "colormap": must be "new" or a window name
- Category: Error
- Explanation: The command expects the string to specify a colormap to use. If the string is "new", a new colormap is created. Otherwise, the string should be a valid window path name.
badCursor
- Message String: Invalid cursor spec
- Category: Error
- Explanation: The command expects the string to specify a cursor to use. The string can take any of the following forms:
- If the name form is used, and the name of the cursor is not defined on all platforms, a warning is flagged stating that the cursor is not portable; see nonPortCursor. None of the forms that specify a color or multiple files are portable across all systems; they are flagged as being non-portable; see nonPortCmd.
badEvent
- Message String: Invalid event type or keysym
- Category: Error
- Explanation: The command expects the string to specify an event type. If the string is not composed of a valid event and one or more related modifiers, an error is reported.
badFloat
- Message String: Invalid floating-point value
- Category: Error
- Explanation: The command expects the string to consist of a floating-point number, which is: white space; a sign; a sequence of digits; a decimal point; a sequence of digits; the letter "e"; and a signed decimal exponent. Any of the fields may be omitted, except that the digits either before or after the decimal point must be present and if the "e" is present then it must be followed by the exponent number.
badGeometry
- Message String: Invalid geometry specifier
- Category: Error
- Explanation: The command expects the string to specify a geometry value. The string must have one of the following forms:
badGridMaster
- Message String: Cannot determine master window
- Category: Error
- Explanation: The grid command flags an error if a valid window name was never specified in the command.
badGridRel
- Message String: Must specify window before shortcut
- Category: Error
- Explanation: When using the relative placement shortcuts in the grid command (that is, "-", "x", or "^") an error is reported if the span column shortcut ("-") is used immediately after one of the other shortcuts.
badIndex
- Message String: Invalid index: should be integer or end
- Category: Error
- Explanation: The command expects the string to specify an index value. The string can be an integer or "end" or "end-some integer".
badInt
- Message String: Invalid integer
- Category: Error
- Explanation: The command expects the string to specify an integer value. The string can be optionally signed and optionally preceded by white space. If the first two characters of the string are "0x" then string is expected to be in hexadecimal form; if the first character of string is "0" then the string is expected to be in octal form; otherwise, the string is expected to be in decimal form.
badKey
- Message String: Invalid keyword: "key" must be: options
- Category: Error
- Explanation: The command expects the key string to be a key that matches one of the strings in the options list.
badLevel
- Message String: Invalid level
- Category: Error
- Explanation: The command expects the string to be an integer or a "#" character followed by an integer.
badLIndex
- Message String: Invalid index: should be integer, "len" or "end"
- Category: Error
- Explanation: The command expects the string to specify an index value. The string can be an integer, "len", or "end" or "end-some integer".
badList
- Message String: Invalid list: error-info
- Category: Error
- Explanation: The command expects the string to be a valid Tcl list. The reason the string is not a valid Tcl list is displayed in the message associated with the error.
badMemberName
- Message String: Invalid list: error-info
- Category: Error
- Explanation: The command expects the string to be a valid Tcl list. The reason the string is not a valid Tcl list is displayed in the message associated with the error.
badMemberName
- Message String: Missing class specifier for body declaration
- Category: Error
- Explanation: An [incr Tcl] member name was not correctly qualified. When defining the body for a class procedure, class method, or class variable, it is necessary to reference the procedure or variable with the fully qualified name.
badMode
- Message String: Access mode must include either RDONLY, WRONLY, or RDWR
- Category: Error
- Explanation: When specifying access modes for a Tcl channel, at least one of the three read-write access modes (RDONLY, WRONLY, or RDWR) must be specified with optional modifiers (APPEND, CREAT, EXCL, NOCTTY, NONBLOCK or TRUNC).
badOption
- Message String: Invalid option "option" must be: options
- Category: Error
- Explanation: The command expects the option string to be an option that matches one of the strings in options.
badPalette
- Message String: Invalid palette spec
- Category: Error
- Explanation: The command expects the string to be a valid palette specification. The palette string may be either a single decimal number, specifying the number of shades of gray to use, or three decimal numbers separated by slashes ("/"), specifying the number of shades of red, green and blue to use, respectively.
badPixel
- Message String: Invalid pixel value
- Category: Error
- Explanation: The command expects the string to specify a pixel value. The string must be an integer pixel or floating-point millimeter, optionally followed by one of the following characters: "c", "i", "m", or "p".
badPriority
- Message String: Invalid priority keyword or value
- Category: Error
- Explanation: The command expects the string to specify a priority value. The string must contain one of the following values: "widgetDefault", "startupFile", "userDefault", "interactive", or an integer between 0 and 100.
badProfileOpt
- Message String: Option option not valid when turning off profiling
- Category: Error
- Explanation: Using the TclX profiling tools, option is not valid. Most likely the option is valid only when turning on profiling.
badResource
- Message String: Invalid resource name
- Category: Error
- Explanation: The command expects the string to specify a resource value. If the string length is not four characters, an error is flagged.
badScreen
- Message String: Invalid screen value
- Category: Error
- Explanation: The command expects the string to specify a screen value. The string must have the following form:
- ?name?:display?.screen?
- where name is any string and display and screen are integers.
badSticky
- Message String: Invalid stickiness value: should be one or more of nswe
- Category: Error
- Explanation: The grid command expects the string to specify valid sticky coordinates. The string can contain any combination of the following characters: "n", "s", "e". or "w".
badSwitch
- Message String: Invalid switch: "switch"
- Category: Error
- Explanation: The command expects the string to be a switch that matches one of the strings in list of switch options.
badTab
- Message String: Invalid tab list
- Category: Error
- Explanation: The command expects a list of strings that define tab stops. If the Tcl interpreter cannot parse the list, an error is flagged. The tab list must consist of a list of screen distances giving the positions of the tab stops. Each position can optionally be followed in the next list element by one of the keywords "left", "right", "center", or "numeric", which specifies how to justify text relative to the tab stop.
badTabJust
- Message String: Invalid tab justification "tab-item": must be left right center or numeric
- Category: Error
- Explanation: The command expects the justification string to be one of the following: "left", "right", "center", or "numeric".
badTlibFile
- Message String: The filename must have a ".tlib" suffix
- Category: Error
- Explanation: The command expected a filename with a .tlib suffix. The word should be changed to match the pattern filename.tlib.
badTraceOp
- Message String: Invalid operation "op": should be one or more of rwu
- Category: Error
- Explanation: The command expects the trace operation string to be one or more of the following characters: "r", "w", or "u".
badVersion
- Message String: Invalid version number
- Category: Error
- Explanation: The command expects a list of strings that specifies a package version. A valid package version string is any number of integers separated by periods ("."), for example, "1.2.3".
badVirtual
- Message String: Virtual event is badly formed
- Category: Error
- Explanation: The command expects the string to specify a virtual event. The string must have the following form:
- where word is any non-empty string.
badVisual
- Message String: Invalid visual
- Category: Error
- Explanation: The command expects the string to specify a visual. The string can have the following form:
- The class string must be one of "directcolor", "grayscale", "pseudocolor", "staticcolor", "staticgray", or "truecolor", or any unique abbreviation. The depth value must be a valid integer.
badVisualDepth
- Message String: Invalid visual depth
- Category: Error
- Explanation: If the depth specified by a visual string is not a valid integer, then this error is flagged.
badWholeNum
- Message String: Invalid value "value": must be a non-negative integer
- Category: Error
- Explanation: The command expects the string to specify a whole value. The string can be any non-negative integer.
classNumArgs
- Message String: Wrong # args for class constructor: className.
- Category: Error
- Explanation: The wrong number of arguments are being used to instantiate the [incr Tcl] class className. Compare the number of arguments used to instantiate the class to the number of arguments in the constructor defined by className.
classOnly
- Message String: Command "command" only defined in class body
- Category: Error
- Explanation: The specified command is only valid in the context of an [incr Tcl] class body.
errBadBrktExp
- Message String: The bracket expression is missing a close bracket
- Category: Error
- Explanation: The bracket expression is missing a close bracket. Common errors of this type are caused when the closing bracket is interpreted as a character to match on. For example [] and [^] will generate this error because the close bracket is interpreted as a character to match, or not match, respectively. The correct expressions would be: []] and [^]].
mismatchOptions
- Message String: The specified options cannot be used in tandem
- Category: Error
- Explanation: Two or more options were specified that cannot be used at the same time. The command should be re-written to use only one of the switches. This commonly occurs when an overloaded command performs completely different operations based on the switches.
noEvent
- Message String: No events specified in binding
- Category: Error
- Explanation: The command expects an event but could not find one while parsing the command line.
noExpr
- Message String: Missing an expression
- Category: Error
- Explanation: Similar to the numArgs message. The TclPro Checker flags this error message when an expression is missing in an if statement.
noScript
- Message String: Missing a script after control
- Category: Error
- Explanation: Similar to the numArgs message. The TclPro Checker flags this error message when a script is missing in an if statement.
noSwitchArg
- Message String: Missing argument for switch switch
- Category: Error
- Explanation: The command was called with a switch that expected an argument. If no argument was given for the switch, this error is flagged.
noVirtual
- Message String: Virtual event not allowed in definition of another virtual event
- Category: Error
- Explanation: Virtual events are not allowed in event sequences. If a virtual event (any event that begins with "<<" and ends with ">>") is found, then this message is flagged.
nonDefAfterDef
- Message String: Non-default arg specified after default
- Category: Error
- Explanation: A non-defaulted argument has been specified after a defaulted argument in a procedure argument list. Although the Tcl interpreter does not complain about this usage, the default values are ignored.
nonPortBitmap
- Message String: Use of non-portable bitmap
- Category: Non-Portable Warning
- Explanation: A bitmap was specified that is not supported on all platforms.
nonPortChannel
- Message String: Use of non-portable file descriptor, use "file" instead
- Category: Non-Portable Warning
- Explanation: A channel was specified that is not supported on all platforms. In most cases, this is when "file0", "file1", or "file2" is used instead of "stdin", "stdout", or "stderr".
nonPortCmd
- Message String: Use of non-portable command
- Category: Non-Portable Warning
- Explanation: A command was specified that is not supported on all platforms.
nonPortColor
- Message String: Non-portable color name
- Category: Non-Portable Warning
- Explanation: A color was specified that is not supported on all platforms.
nonPortCursor
- Message String: Non-portable cursor usage
- Category: Non-Portable Warning
- Explanation: A cursor was specified that is not supported on all platforms.
nonPortFile
- Message String: Use of non-portable file name, use file join
- Category: Non-Portable Warning
- Explanation: A file name was specified that is not supported on all platforms. This warning is flagged, then the string is a combination of words, variables, or commands separated by system-specific file separators (for example, "$dir\$file"). Use the file join command to add the system-specific file separators (for example, "[file join $dir $file]").
nonPortKeysym
- Message String: Use of non-portable keysym
- Category: Non-Portable Warning
- Explanation: A keysym was specified that is not supported on all platforms.
nonPortOption
- Message String: Use of non-portable option
- Category: Non-Portable Warning
- Explanation: An option was specified that is not supported on all platforms. Generally, the option has no effect on the systems that do not support this option.
nonPortVar
- Message String: Use of non-portable variable
- Category: Non-Portable Warning
- Explanation: A variable was used that is not supported on all platforms. In most cases, this is when the tcl_precision variable is used.
nsOnly
- Message String: Command "command" only defined in namespace body
- Category: Error
- Explanation: The specified command is only valid in the context of an [incr Tcl] namespace body.
nsOrClassOnly
- Message String: Command command only defined in class or namespace body
- Category: Error
- Explanation: The specified command is only valid in the context of an [incr Tcl] class or namespace body.
numArgs
- Message String: Wrong # args
- Category: Error
- Explanation: An incorrect number of arguments were specified for a command. Due to the dynamic nature of Tcl, this error might be flagged unnecessarily. For example, if the command is called within an eval body with variables that will expand to be multiple arguments. The TclPro Checker sees only the one argument, but this may expand to match the required number of arguments when the command is evaluated.
numListElts
- Message String: Invalid number of list elements
- Category: Error
- Explanation: An incorrect number of list elements were specified.
obsoleteCmd
- Message String: Deprecated usage, use "command" instead
- Category: Error
- Explanation: The specified command, option or variable does not exist and is no longer supported in the version of the system you are checking. Use the suggested alternative command, option, or variable to upgrade the script.
optionRequired
- Message String: Expected option1, got "option2"
- Category: Error
- Explanation: A specific option was expected, but the following option was found.
parse
- Message String: Parse error: error-info
- Category: Error
- Explanation: The TclPro Checker could not parse the script completely due to a parsing error. The reason for the parsing error is displayed in the message associated with the error.
procNumArgs
- Message String: Wrong # args for user-defined proc: procName
- Category: Error
- Explanation: You are using the wrong number of arguments to call the Tcl procedure procName. Compare the number of arguments used to call the procedure to the number of arguments in the definition of procName.
procOutScope
- Message String: Proc only defined in class className
- Category: Error
- Explanation: An [incr Tcl] class procedure is being called from the wrong scope, or is improperly qualified. This commonly occurs when calling inherited procedures.
procProtected
- Message String: Calling protectionLevel proc: procName
- Category: Error
- Explanation: You are calling an inaccessible procedure with a protection level of protectionLevel. This error is flagged when the procedure being called does not have permission to call this procedure.
serverAndPort
- Message String: Option myport is not valid for server sockets
- Category: Error
- Explanation: The socket command specified the server option and the myport option on the same command line. These are conflicting options and cannot be used together.
socketAsync
- Message String: Cannot use server option and async option
- Category: Error
- Explanation: The socket command specified the server option and the async option on the same command line. These are conflicting options and cannot be used together.
socketServer
- Message String: Cannot use async option for server sockets
- Category: Error
- Explanation: The socket command specified the async option and the server option on the same command line. These are conflicting options and cannot be used together.
tooManyFieldArg
- Message String: Too many fields in argument specifier
- Category: Error
- Explanation: A defaulted procedure argument has been specified with multiple values. An argument can have only one default value. If the value is to be a list, quotes or curly braces must be used.
warnAmbiguous
- Message String: Ambiguous switch, use delimiter to avoid conflicts
- Category: Usage Warning
- Explanation: The word being checked starts with a "-" but does not match any of the known switches. Use delimiter to explicitly declare the end of the switch pattern.
warnDeprecated
- Message String: Deprecated usage, use "command" instead
- Category: Upgrade Warning
- Explanation: The specified command, option or variable does not exist and is no longer supported in the version of the system you are checking. Use the suggested alternative command, option or variable to upgrade the script.
warnEscapeCharacter
- Message String: "\<char>" is a valid escape sequence in later versions of Tcl.
- Category Upgrade Warning
- Explanation: The new regular expression package introduced in Tcl 8.1 added many new special character sequences, called "escape characters." When upgrading to 8.1 or later, the escape characters will change the semantics of the expression. To maintain the behavior of previous versions of Tcl, add another backslash before the character. (This warning is displayed only if you specify the use option with Tcl 8.0 or earlier.)
warnExportPat
- Message String: Export patterns should not be qualified
- Category: Warning
- Explanation: Each export pattern can contain glob-style special characters, but it must not include any namespace qualifiers. That is, the pattern can only specify commands in the current (exporting) namespace.
warnExpr
- Message String: Use curly braces to avoid double substitution
- Category: Performance Warning
- Explanation: The expr command performs two levels of substitution on all expressions that are not inside curly braces. To avoid the second substitution, and to improve the performance of the command, place the expression inside curly braces.
- Note There are cases where the second level of substitution is required and this warning will not apply. The TclPro Checker does not discern between these cases.
warnExtraClose
- Message String: Unmatched closing character
- Category: Usage Warning
- Explanation: A close bracket or close brace without a matching open bracket or open brace was detected. This frequently indicates an error introduced when a sub-command or script is deleted without deleting the final close brace or bracket.
warnIfKeyword
- Message String: Deprecated usage, use else or elseif
- Category: Warning
- Explanation: When using the if command, it is legal to omit the else and elseif keywords. However, omission of these keywords tends to produce error-prone code; thus, a warning is flagged.
warnNamespacePat
- Message String: glob chars in wrong portion of pattern
- Category: Warning
- Explanation: Each namespace pattern is qualified with the name of an exporting namespace and may have glob-style special characters in the command name at the end of the qualified name. The warning is flagged if glob characters appears in a namespace name.
warnNotSpecial
- Message String: "\<char>" has no meaning. Did you mean "\\<char>" or "<char>"?
- Category: Upgrade Warning
- Explanation: The backslash character is used to quote special characters in an expression so their literal value can be used. The character following the backslash in this expression has no affect on the character. Consider simplifying the expression.
warnPattern
- Message String: Possible unexpected substitution in pattern
- Category: Warning
- Explanation: Glob patterns use brackets to specify a list of characters to match. If brackets are used and the word is not properly quoted, Tcl will interpret this as a sub-command to be evaluated, rather than a pattern. This warning is flagged to avoid possible usage errors of this nature.
warnQuoteChar
- Message String: "\" in bracket expressions are treated as quotes
- Category: Upgrade Warning
- Explanation: The new regular expression package introduced in Tcl 8.1 changed the semantics of the backslash character inside of bracket expressions. Previously they were treated as literal characters. Now they are treated as a quote character. To maintain the behavior of previous versions of Tcl, add another backslash before the existing backslash (for example, [*\] becomes [*\\]). (This warning is displayed only if you specify the use option with Tcl 8.0 or earlier.)
warnRedefine
- Message String: userProc1 redefines userProc2 in file fileName on line lineNum
- Category: Usage Warning
- Explanation: A procedure or class is being defined, imported, inherited, or renamed into a scope where a procedure or class of the same name already exists.
warnReserved
- Message String: Keyword is reserved for use in version
- Category: Upgrade Warning
- Explanation: When checking scripts using older versions of Tcl, Tk or [incr Tcl], this warning is flagged if a command is used that does not exist in the systems that you are checking against, but does exist in later versions. This warning helps to prevent scripts from defining commands that will eventually collide with later versions.
warnUndefProc
- Message String: The procedure was called but was never defined
- Category: Warning
- Explanation: The procedure was not defined in any of the files that were specified on the command line of the current invocation of the TclPro Checker. The procedure may get defined dynamically or in a file that was not specified on the TclPro Checker command line. This warning is triggered only for the first use of the undefined procedure in the files being checked.
warnUnsupported
- Message String: Unsupported command, option or variable: use command
- Category: Error
- Explanation: The specified command, option or variable still exists but is no longer supported. Use the suggested alternative command, option, or variable to upgrade the script.
warnVarRef
- Message String: Variable reference used where variable name expected
- Category: Warning
- Explanation: Some commands expect a variable name for an argument, for example, incr. If the argument is a variable reference, this warning is flagged to report possible usage errors.
warnY2K
- Message String: %y generates a year without a century. consider using %Y to avoid Y2K errors.
- Category: Warning
- Explanation: To avoid possible Y2K errors, use the "%Y" field descriptor to generate years with centuries (for example, "1999" instead of "99").
winAlpha
- Message String: Window name cannot begin with a capital letter
- Category: Error
- Explanation: The window name for any Tcl widget cannot begin with a capital letter.
winBeginDot
- Message String: Window name must begin with "."
- Category: Error
- Explanation: The path name for any Tcl widget must begin with a period (".")
winNotNull
- Message String: Window name cannot be an empty string
- Category: Error
- Explanation: A window name or path cannot be an empty string.
http://www.ajubasolutions.com Voice: (650) 210-0100 Fax: (650) 210-0101 support@ajubasolutions.com |