Skip to main content

tclint   CI

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

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 search for a file named tclint.toml or .tclint by walking the parent directories of source files, 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
$ python3 -m venv .venv # set up a venv to ensure clean environment
$ source .venv/bin/activate
(venv) $ pip install --upgrade pip # development requires pip >= 25.1
(venv) $ pip install -e . --group dev

Please format, lint, and run tests before submitting changes:

$ source .venv/bin/activate
(venv) $ black .
(venv) $ ./util/pre-commit

License

This project is copyright Noah Moroze, released under the MIT license.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tclint-0.9.0.tar.gz (100.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tclint-0.9.0-py3-none-any.whl (58.0 kB view details)

Uploaded Python 3

File details

Details for the file tclint-0.9.0.tar.gz.

File metadata

  • Download URL: tclint-0.9.0.tar.gz
  • Upload date:
  • Size: 100.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for tclint-0.9.0.tar.gz
Algorithm Hash digest
SHA256 15517ecb8193e3fd72b657459b633853ba9a60c2124b421c95f613914b89654b
MD5 2710322b8930bc959e8c65013920a339
BLAKE2b-256 85d8ebee2778ef596bb6038381299142923f7dbd8e021f2d5711b201a56a5c13

See more details on using hashes here.

Provenance

The following attestation bundles were made for tclint-0.9.0.tar.gz:

Publisher: release.yml on nmoroze/tclint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tclint-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: tclint-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 58.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for tclint-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e4f0eb6b263161190a502184425fdd3ab046d09112da8089ddb767e7de198583
MD5 7aa9d0973fc5b599357400be10ecc43b
BLAKE2b-256 46d6d1cf5cad5bb11d79546785972f04f6cb51e4415f25eba8957d405c1f8148

See more details on using hashes here.

Provenance

The following attestation bundles were made for tclint-0.9.0-py3-none-any.whl:

Publisher: release.yml on nmoroze/tclint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 files

0.8.0

2 files

0.7.0

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page