Message ID | Category | Message String |
argAfterArgs | Error | argument specified after "args" |
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 | Error | "args" cannot be defaulted |
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. | ||
arrayReadAsScalar | Error | Array variable "%1$s" read as if a scalar |
You cannot assign an array variable to a scalar variable. The Tcl Dev Kit TclChecker is aware of the internal variables tcl_platform and Tk::priv, and will generate this error when you attempt to assign these variables to a scalar. | ||
badArrayIndex | Error | invalid array index "%1$s" |
This error occurs when you try to read from the tcl_platform internal variable with an invalid index key. The tcl_platform variable is initialized at run-time by the system definition, and should not be manually altered. | ||
badBoolean | Error | invalid Boolean value |
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 | Error | invalid number, should be between 0 and 255 |
badColorFormat | Error | invalid color name |
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 "PeachPuff".
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
|
||
badContinuation | Error | bad continuation line, whitespace after backslash |
The checker saw a backslash character, followed by whitespace, followed by an end of line. It assumes that the user wanted to specify a continuation line, which has no whitespace between the backslash and the end of the line. | ||
badCursor | Error | invalid cursor spec |
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 |
||
badExtendedIndexExpr | Error | invalid index: should be integer or "end" or "end-integer" or "end+integer" or integer-integer or integer+integer |
When reading an index, you must specify the exact integer position, or the sum/difference of two integers (integer+integer, integer-integer), or the position relative to the end of the index using the "end" or "end-index_number" or "end+index_number" strings. | ||
badFloat | Error | invalid floating-point value |
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. | ||
badIndex | Error | invalid index: should be integer or "end" |
The command expects the string to specify an index value. The string can be an integer or "end". | ||
badIndexExpr | Error | invalid index: should be integer or "end" or "end-integer" |
When reading an index, you must specify the exact integer position, or the position relative to the end of the index using the "end" or "end-index_number" strings. | ||
badInt | Error | invalid integer |
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 | Error | invalid keyword "%2$s" must be: %1$s |
The command expects the key string to be a key that matches one of the strings in the options list. | ||
badLevel | Error | invalid level |
The command expects the string to be an integer or a "#" character followed by an integer. | ||
badList | Error | invalid list: %1$s |
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. | ||
badListLength | Error | invalid list length: Expected %% %1$s == %2$s |
The command expects the string to be a valid Tcl list with a length n satisfying the condition "n % x == y". For example: "n % 2 == 0" is the condition for lists of even length. | ||
badMathOp | Error | invalid expr operator: "%1$s" |
When working with mathematical expressions, you must use valid operators for the "expr" command. See "expr" in the Tcl Commands Manual section of the ActiveTcl User Guide. | ||
badMode | Error | access mode must include either RDONLY, WRONLY, or RDWR |
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). | ||
badNatNum | Error | invalid value "%1$s": must be an integer > 0 |
The command expects the string to specify an integer greater than zero. The string can be any non-negative integer. | ||
badOption | Error | invalid option "%2$s" must be: %1$s |
The command expects the option string to be an option that matches one of the strings in options. | ||
badPixel | Error | invalid pixel value |
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". | ||
badRegexp | Error | Bad regexp pattern: %1$s |
badRequirement | Error | invalid requirement |
The command expects a valid package requirement, which can be a version number, a version number with a single trailing dash, or two version numbers spearated by a single dash. | ||
badResource | Error | invalid resource name |
The command expects the string to specify a resource value. If the string length is not four characters, an error is flagged. | ||
badSwitch | Error | invalid switch: "%1$s" |
The command expects the string to be a switch that matches one of the strings in list of switch options. | ||
badValidateSubst | Error | validate script contains unknown %%-placeholders |
This error indicates that a placeholder character specified for a -validatecommand script is invalid. Refer to the ActiveTcl User Guide for the "ttk::entry" command. | ||
badVersion | Error | invalid version number |
The command expects a string that specifies a package version. A valid package version string is any number of integers separated by periods ("."), for example, "1.2.3", with no leading 0's, in since Tcl 8.5 a single dot may be 'a' or 'b' | ||
badWholeNum | Error | invalid value "%1$s": must be a positive integer |
The command expects the string to specify a whole value. The string can be any non-negative integer. | ||
errBadBrktExp | Error | the bracket expression is missing a close bracket |
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 [^]]. | ||
internalError | Error | internal error: %1$s |
This message indicates a bug in the Tcl Dev Kit TclChecker. Please file a bug report, including the steps necessary to reproduce the error, at http://bugs.activestate.com/Tcl Dev Kit. | ||
invalidUsage | Error | invalid usage, use "%1$s" instead |
All functions internal to the Tk binding have been moved to the "Tk::" namespace and have been made private. In Tcl 8.4 mode, this error reports use of a command that is now invalid. | ||
maybeBadSwitch | Warning | possibly invalid switch: "%1$s" |
The command expected the string to be a switch that matches one of the strings in a list of switch options, however even a switch not in the list might be ok, as the set of switches is extensible and the list in the checker cannot account for such. The premier example of this is fconfigure's set of switches, which can be extended by user-defined channel types. | ||
mismatchOptions | Error | the specified options cannot be used in tandem |
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. | ||
noExpr | Error | missing an expression |
Similar to the numArgs message. The Tcl Dev Kit TclChecker flags this error message when an expression is missing in an if
statement.
|
||
nonDefAfterDef | Error | non-default arg specified after default |
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. | ||
nonPortChannel | Non-Portable | use of non-portable file descriptor, use "%1$s" instead |
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 | Non-Portable | use of non-portable command |
A command was specified that is not supported on all platforms. | ||
nonPortCmdR | Non-Portable | replace use of non-portable command with %1$s |
A command was specified that is not supported on all platforms. Advice on how to make it portable is given. | ||
nonPortColor | Non-Portable | non-portable color name |
A color was specified that is not supported on all platforms. | ||
nonPortCursor | Non-Portable | non-portable cursor usage |
A cursor was specified that is not supported on all platforms. | ||
nonPortFile | Non-Portable | use of non-portable file name, use "file join" |
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]"). | ||
nonPortOption | Non-Portable | use of non-portable option |
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 | Non-Portable | use of non-portable variable |
A variable was used that is not supported on all platforms. In most cases, this is when the tcl_precision variable is used. | ||
nonPublicVar | Non-Public | use of private variable |
This error indicates that the program is trying to use the contents of the Tk::priv variable. This variable is internal and should not be used. | ||
noScript | Error | missing a script after "%1$s" |
Similar to the numArgs message. The Tcl Dev Kit TclChecker flags this error message when an expression is missing in an if
statement.
|
||
noSwitchArg | Error | missing argument for %1$s switch |
The command was called with a switch that expected an argument. If no argument was given for the switch, this error is flagged. | ||
numArgs | Error | wrong # args |
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 Tcl Dev Kit TclChecker sees only the one argument, but this may expand to match the required number of arguments when the command is evaluated. | ||
numListElts | Error | wrong # of list elements |
Some commands expect lists with a fixed number of elements. This error indicates that an incorrect number of elements has been specified. See the documentation for the specific command in the ActiveTcl User Guide. | ||
obsoleteCmd | Error | Obsolete usage, use "%1$s" instead |
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. | ||
parse | Error | parse error: %1$s |
The Tcl Dev Kit TclChecker 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. | ||
pragmaBad | Warning | Bad pragma "%1$s" before command: %2$s |
A syntactically wrong pragma was found. | ||
pragmaNotComplete | Warning | Incomplete pragma "%1$s" before command |
Pragmas cannot be split across several lines. | ||
procNumArgs | Error | wrong # args for user-defined proc: "%1$s" |
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. | ||
tooManyFieldArg | Error | too many fields in argument specifier |
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. | ||
warnArgWrite | Warning | Overwriting procedure argument "%1$s" |
A command writes to a variable representing a procedure argument. | ||
warnBadSequence | Warning | The command "%1$s" is not allowed after command "%2$s" (see line %3$s), expected it after '%4$s' |
A package has defined ordering requirements for one or more of its commands, and a violation was detected. Specifically the first named command is not allowed to be run after the second named command. The line the second command is on is provided, for reference. | ||
warnBadSequenceFirst | Warning | The command "%1$s" is not allowed as first command, expected it after '%2$s' |
A package has defined ordering requirements for one or more of its commands, and a violation was detected. Specifically the named command is not allowed to be the first command in a sequence. Likely some initialization command has to come before it. | ||
warnBehaviour | Upgrade | behaviour has changed, %1$s |
This warning indicates use of a variable whose behaviour has changed between the current Tcl version and previous versions. | ||
warnBehaviourCmd | Upgrade | behaviour of command has changed, %1$s |
This warning indicates use of a command whose behaviour has changed between the current Tcl version and previous versions. | ||
warnContinuation | Warning | possibly bad continuation line, blank line after backslash |
The command ended in a continuation line with an empty line following, which is suspicious | ||
warnDeprecated | Upgrade | deprecated usage, use "%1$s" instead |
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. | ||
warnDoubleDash | Warning | Use -- before this computed word to prevent its possible misinterpretation as switch |
The command is called with a dynamic string in a position where it can be mis-interpreted as a switch, should it start with a dash. The command is able to take a double-dash switch to force interpretation of all following arguments as non-switches, even if beginning with a dash. | ||
warnEscapeChar | Upgrade | "\%1$s" is a valid escape sequence in later versions of Tcl. |
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 | Warning | export patterns should not be qualified |
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 | Performance | use curly braces to avoid double substitution and/or performance degradation |
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.
There are cases where the second level of substitution is required and this warning will not apply. The Tcl Dev Kit TclChecker does not discern between these cases. |
||
warnExtraClose | Usage | unmatched closing character |
A close bracket or close brace without a matching open bracket or open brace was detected. This frequently indicates an error introduced when a subcommand or script is deleted without deleting the final close brace or bracket. | ||
warnGlobalNsNonsense | Warning | global into a namespace is undefined |
Using the global command within a namespace eval is an undefined operation.
|
||
warnGlobalVarColl | Warning | namespace variable "%1$s" may collide with global variable of same name |
When writing to the variable via set it is undetermined if a global or namespace variable is
created.
|
||
warnIfKeyword | Warning | deprecated usage, use else or elseif |
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. | ||
warnInternalCmd | Warning | usage of internal command, may change without notice |
This message indicates that you are using commands internal to an extension. It is safer to use public APIs wherever possible. | ||
warnMisplacedDefault | Warning | The %1$s command might have a misplaced default branch |
Switch/case commands should have a default branch, to catch unexpected input. This command has such a branch, but in a place where it will not be recognized as such. Default branches have to be specified as the last branch in a switch/case. | ||
warnNamespacePat | Warning | glob chars in wrong portion of pattern |
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. | ||
warnNestedExpr | Performance | avoid nesting of expr in expression |
It doesn't make sense to use the expr command inside of an expression. It is superflous and makes the code only less readable and more confusing. | ||
warnNoDefault | Warning | The %1$s command has no default branch |
Switch/case commands should have a default branch, to catch unexpected input | ||
warnNotSpecial | Upgrade | "\%1$s" has no meaning. Did you mean "\\%1$s" or "%1$s"? |
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 | Warning | possible unexpected substitution in pattern |
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 subcommand to be evaluated, rather than a pattern. This warning is flagged to avoid possible usage errors of this nature. | ||
warnQuoteChar | Upgrade | "\" in bracket expressions are treated as quotes |
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.) | ||
warnReadonlyVar | Warning | Variable "%1$s" is considered read-only |
The Tcl Dev Kit TclChecker is hard-coded to recognize certain variables as internal to Tcl/Tk. The value of these variables should not
be changed. These variables include:
|
||
warnRedefine | Usage | %1$s %2$s redefines %3$s %2$s in file %4$s on line %5$s |
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 | Upgrade | keyword is reserved for use in %1$s |
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. | ||
warnShadowVar | Warning | Shadowing a previous definition |
This usage of the variable may hide or kill a previous definition of the same name. | ||
warnStyleArgumentList | Style | use curly braces to avoid double substitution in argument list |
The argument list of a procedure should alsmost always not be subjected to a second round of substitution. Use quoting with curly braces to prevent that | ||
warnStyleCodeBlock | Style | use curly braces to avoid double substitution in code blocks |
Code blocks quoted with double-apostrophes are subject to a second round of substitution. That is almost always not wanted. Use quoting with curly braces to prevent that | ||
warnStyleCodeBlockShort | Style | Start and end code block on a new line |
For readability the code in a braced script should start and end on separate lines, i.e. the enclosing braces should on their own lines | ||
warnStyleCodeblockTooFar | Style | Code blocks separated by more than one empty line |
Two commands in a script have been separated by more than a single empty line, i.e. leading to an overly large gap between them | ||
warnStyleError | Style | avoid the error command |
Usage of the 'error' command should be avoided in test scripts | ||
warnStyleExit | Style | avoid the exit command |
Usage of the 'exit' command should be avoided in packages or test scripts | ||
warnStyleExprBoolEquality | Style | Exclude %1$s from boolean expression |
The expression uses == and/or != to compare against a boolean constant. A == can be removed, a != replaced by a plain !, given that the expression is already a boolean for this to work | ||
warnStyleExprOperatorParens | Style | Wrap sub-expression in parens to avoid logic errors |
Be cautious with sub-expressions, use parentheses | ||
warnStyleExprOperatorWhitespace | Style | Separate operators and expression terms with spaces |
The operator is not separated by whitespace from the remainder of the expression | ||
warnStyleIndentBlock | Style | Indent for end of block is %1$s, expected %2$s. |
The indentation at the end of the code block does not match our expectations | ||
warnStyleIndentCommand | Style | Indent of command is %1$s, expected %2$s. |
The actual indentation of the command does not match our expectations based on the nesting level | ||
warnStyleLineTooLong | Style | Line exceeds %1$s characters in length |
Overly long lines impair code readability | ||
warnStyleNameNamespace | Style | Namespace name "%1$s" does not match style "%2$s" |
The namespace name violates the specified pattern | ||
warnStyleNamePackage | Style | Package name "%1$s" does not match style "%2$s" |
The package name violates the specified pattern | ||
warnStyleNameProcedure | Style | Procedure name "%1$s" does not match style "%2$s" |
The procedure name violates the specified pattern | ||
warnStyleNameVariable | Style | Variable name "%1$s" does not match style "%2$s" |
The variable name violates the specified pattern | ||
warnStyleNameVariableTooLong | Style | Variable name "%1$s" too long, want at most %2$s characters |
The variable name is considered to be overly long for good code | ||
warnStyleNameVariableTooShort | Style | Variable name "%1$s" too short, need at least %2$s characters |
The variable name is considered to be too short for good code | ||
warnStyleNesting | Style | Refactor code blocks > %1$s levels deep |
Readability of code is impaired if nested very deeply, especially when also trying to avoid overly long lines | ||
warnStyleOneCommandPerLine | Style | Multiple commands on a single line |
Using multiple separate commands on a single line may lead to difficult to read code. It is better to place them on separate lines | ||
warnStylePlainVar | Style | do not use double quotes for plain variable references |
A single variable reference doesn't need any quoting | ||
warnStylePlainWord | Style | use double quotes for simple words |
A simple word not containing variable references or subcommands should be quoted with double-apostrophes, if any | ||
warnUndefFunc | Warning | unknown math function: "%1$s" |
The specified function is not defined as part of the "expr" command. See the "expr" command reference in the ActiveTcl User Guide for a list of valid functions. | ||
warnUndefinedUpvar | Warning | upvar'd variable "%1$s" missing in caller scope "%2$s" |
The named procedure (in)directly calls the current scope, but is not defining the variable expected by the upvar. | ||
warnUndefinedVar | Warning | use of undefined variable "%1$s" |
The named variable is not known in the current scope. | ||
warnUndefProc | Warning | undefined procedure: %1$s |
The procedure was not defined in any of the files that were specified on the command line of the current invocation of the Tcl Dev Kit TclChecker. The procedure may get defined dynamically or in a file that was not specified on the Tcl Dev Kit TclChecker command line. This warning is triggered only for the first use of the undefined procedure in the files being checked. | ||
warnUnsupported | Upgrade | unsupported command, option or variable: use %1$s |
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. | ||
warnUpvarNsNonsense | Warning | Non-global upvar into a namespace is undefined |
You cannot import procedure-local variables into a namespace scope. | ||
warnVarRef | Warning | variable reference used where variable name expected |
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. | ||
winAlpha | Error | window name cannot begin with a capital letter |
The window name for any Tcl widget cannot begin with a capital letter. | ||
winBeginDot | Error | window name must begin with "." |
The path name for any Tcl widget must begin with a period (".") | ||
winNotNull | Error | window name cannot be an empty string |