Tclint Bazel rules

Rules

Aspects

tcl_tclint_fmt_test

load("@rules_tcl//tcl/tclint:defs.bzl", "tcl_tclint_fmt_test")

tcl_tclint_fmt_test(name, target)

A test rule for performing formatting checks on a Tcl target.

Usage:

load("@rules_tcl//tcl/tclint:tcl_tclint_fmt_test.bzl", "tcl_tclint_fmt_test")

tcl_tclint_fmt_test(
    name = "mylib_format",
    target = ":mylib",
)

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
targetThe Tcl target to perform formatting checks on.Labelrequired

tcl_tclint_test

load("@rules_tcl//tcl/tclint:defs.bzl", "tcl_tclint_test")

tcl_tclint_test(name, target)

A test rule for performing tclint linting checks on a Tcl target.

Usage:

load("@rules_tcl//tcl/tclint:tcl_tclint_test.bzl", "tcl_tclint_test")

tcl_tclint_test(
    name = "mylib_tclint",
    target = ":mylib",
)

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
targetThe Tcl target to perform linting on.Labelrequired

tclint_toolchain

load("@rules_tcl//tcl/tclint:defs.bzl", "tclint_toolchain")

tclint_toolchain(name, tclint)

A toolchain rule for configuring tclint.

The tclint_toolchain rule specifies the tclint Python library used by tcl_tclint_aspect, tcl_format_aspect, and related test rules.

Typically, you don't need to define this directly. Instead, use the bzlmod extension:

tclint = use_extension("@rules_tcl//tcl/tclint:extensions.bzl", "tclint")
tclint.toolchain()
use_repo(tclint, "tclint_toolchains")
register_toolchains("@tclint_toolchains//:all")

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
tclintThe tclint python library.Labelrequired

tcl_tclint_aspect

load("@rules_tcl//tcl/tclint:defs.bzl", "tcl_tclint_aspect")

tcl_tclint_aspect()

An aspect for performing tclint linting checks on Tcl targets.

Uses tclint to check for code quality issues.

Usage:

bazel build //my:target \
    --aspects=@rules_tcl//tcl/tclint:tcl_tclint_aspect.bzl%tcl_tclint_aspect \
    --output_groups=+tcl_tclint_checks

Ignoring targets:

To skip tclint for specific targets, add one of these tags:

  • no_tcl_lint
  • no_tclint
  • no_lint
  • nolint

ASPECT ATTRIBUTES

ATTRIBUTES

tcl_tclint_fmt_aspect

load("@rules_tcl//tcl/tclint:defs.bzl", "tcl_tclint_fmt_aspect")

tcl_tclint_fmt_aspect()

An aspect for performing formatting checks on Tcl targets.

Uses tclint to verify formatting.

Usage:

bazel build //my:target \
    --aspects=@rules_tcl//tcl/tclint:tcl_tclint_fmt_aspect.bzl%tcl_tclint_fmt_aspect \
    --output_groups=+tcl_tclint_fmt_checks

Ignoring targets:

To skip format checking for specific targets, add one of these tags:

  • no_tcl_format
  • no_tclformat
  • no_tclfmt
  • noformat
  • nofmt

ASPECT ATTRIBUTES

ATTRIBUTES