A CLI utility for linting and analyzing Tcl code.
Project description
tclint 
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
Violations documentation page for a description of all
lint violations tclint may report.
Aspects of tclint's behavior can be controlled by a configuration file. By default, tclint will look for a file named tclint.toml or .tclint in the current working directory (in that order), but a path to an alternate configuration file can be provided using the -c or --config flag. See Configuration for documentation on the configuration file.
tclint includes a plugin system for checking EDA tool-specific commands. See the Plugins documentation page for more info.
Contributing
tclint welcomes community contributions. The best way to help the project is to open an issue if you find a bug or have a feature request.
PRs are also welcome, but for non-trivial changes please open an issue first to solicit feedback. This helps avoid wasted effort.
Use the following steps to set up tclint for local development:
$ git clone https://github.com/nmoroze/tclint.git # or URL to fork
$ cd tclint
$ pip install -e .[dev]
Please format, lint, and run tests before submitting changes:
$ black --preview .
$ ./util/pre-commit
License
This project is copyright Noah Moroze, released under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tclint-0.6.0.tar.gz.
File metadata
- Download URL: tclint-0.6.0.tar.gz
- Upload date:
- Size: 80.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8dd4d7b519e040c164615df8072cc4c28def4bfdc9d2a8672a280b0984b45fc3
|
|
| MD5 |
c1af5815c7ab3c5a9a6f6456c6a6edd8
|
|
| BLAKE2b-256 |
462ee0b87f58765f43937e06b3f7f5f3e299ec0479fcf99a7ef5c033614d5cdc
|
Provenance
The following attestation bundles were made for tclint-0.6.0.tar.gz:
Publisher:
release.yml on nmoroze/tclint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tclint-0.6.0.tar.gz -
Subject digest:
8dd4d7b519e040c164615df8072cc4c28def4bfdc9d2a8672a280b0984b45fc3 - Sigstore transparency entry: 238813775
- Sigstore integration time:
-
Permalink:
nmoroze/tclint@ae1dd7c930e7a57d4a5d0b8518e8d6d1333c9b63 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/nmoroze
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ae1dd7c930e7a57d4a5d0b8518e8d6d1333c9b63 -
Trigger Event:
release
-
Statement type:
File details
Details for the file tclint-0.6.0-py3-none-any.whl.
File metadata
- Download URL: tclint-0.6.0-py3-none-any.whl
- Upload date:
- Size: 48.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f60d2378dd203c0ee1268e9f9138f17cb6106b8824b727e584f054c5932a87db
|
|
| MD5 |
a1f837fe81227f65149f3997c7b461d4
|
|
| BLAKE2b-256 |
446ae89991190f7c41d4b360c1a4064db879d508da0a49992a072ef007e1ff72
|
Provenance
The following attestation bundles were made for tclint-0.6.0-py3-none-any.whl:
Publisher:
release.yml on nmoroze/tclint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tclint-0.6.0-py3-none-any.whl -
Subject digest:
f60d2378dd203c0ee1268e9f9138f17cb6106b8824b727e584f054c5932a87db - Sigstore transparency entry: 238813779
- Sigstore integration time:
-
Permalink:
nmoroze/tclint@ae1dd7c930e7a57d4a5d0b8518e8d6d1333c9b63 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/nmoroze
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ae1dd7c930e7a57d4a5d0b8518e8d6d1333c9b63 -
Trigger Event:
release
-
Statement type: