rules_vsg 0.3.0Latest published 1.0mo ago
MODULE.bazel
bazel_dep(name = "rules_vsg", version = "0.3.0")
README

rules_vsg

Bazel rules that run VSG (VHDL Style Guide) against vhdl_library targets.

  • vsg_test — Bazel test rule that lints a vhdl_library and fails on violations.
  • @rules_vsg//vsg:fixbazel run-able binary that discovers vhdl_* targets under a query scope and applies vsg --fix in place to their sources.
  • vsg_aspect — aspect that runs VSG as a side effect of bazel build, opt-in via .bazelrc.

Full documentation, setup instructions, and rule reference: https://hw-bzl.github.io/rules_vsg/.

Quick start

load("@rules_vhdl//vhdl:defs.bzl", "vhdl_library")
load("@rules_vsg//vsg:defs.bzl", "vsg_test")

vhdl_library(
    name = "math_pkg",
    srcs = ["math_pkg.vhd", "adder.vhd"],
)

vsg_test(
    name = "math_pkg_vsg_test",
    target = ":math_pkg",
    config = ":vsg_config.yaml",
)

Then:

  • bazel test //:math_pkg_vsg_test — fails on violations
  • bazel run @rules_vsg//vsg:fix -- //:math_pkg — applies vsg --fix to the workspace files
  • bazel run @rules_vsg//vsg:fix — same, but across every vhdl_* target in the workspace

rules_vsg ships with no registered toolchain — you supply vsg as a Python library and register a vsg_toolchain. See the documentation for the full wiring.

About

Bazel rules for VSG (VHDL Style Guide)

@hw-bzl/rules_vsg@hw-bzl
Homepage
Wednesday, August 12, 2026
@hw-bzl-bot#10033 rules_vsg@0.3.0 (#10033)

Languages

Python53.3%
Starlark44.7%
VHDL2%

Maintainers

@UebelAndre

Compatibility

Versions

0.3.0 +14d2026-08-12
0.2.0 +1.6mo2026-07-29
0.1.02026-06-12