A CLI utility for linting and analyzing Tcl code.
Maintained. Last release 4 months ago, commits in 2 of the last 26 weeks. Weaker on commit activity.
pip install tclinttclint 
tclint is a collection of modern dev tools for Tcl. It includes a linter, a formatter, and a language server that provides Tcl support to your editor of choice.
Features
- Editor integration for VS Code, Neovim, and Emacs
- Linting for common Tcl errors
- Formatter that enforces a consistent, readable style
- Plugin system that supports Tcl variants
- More features coming soon!
Getting Started
Install tclint from PyPI using pipx (recommended):
pipx install tclint
Or with pip:
pip install tclint
Run tclint on a Tcl source file by providing its path as a positional argument:
tclint example.tcl
If the file contains any lint violations, they will be printed and tclint will return a non-zero exit code. Otherwise, the output will be empty and tclint will exit successfully.
Example
$ cat example.tcl
if { [expr {$input > 10}] } {
puts $input is greater than 10!
}
$ tclint example.tcl
data/example.tcl:1:6: unnecessary command substitution within expression [redundant-expr]
data/example.tcl:2:3: too many args for puts: got 5, expected no more than 3 [command-args]
Usage
tclint is a command-line utility. It takes a list of paths as positional arguments, which may either be direct paths to source files, or directories which will be recursively searched for files ending in .tcl, .sdc, .xdc, or .upf.
Collected files will be checked for lint violations. See the documentation page for a description of all lint violations may report.