Skip to main content

vi-inspector

Automated code review for LabVIEW — in CI, without LabVIEW installed.

Point it at your VIs; it flags error-handling defects, broken error chains, race-condition risks, and oversized diagrams. Designed for pull-request gating: stable exit codes, baselines ("fail only on new findings"), SARIF output for GitHub code scanning, and a marketplace-ready GitHub Action.

Quickstart

pip install vi-inspector
vi-inspector review path/to/project --fail-on high

Exit codes: 0 = clean, 1 = new findings at/above --fail-on, 2 = operational error (e.g. a VI failed to parse).

CI usage

- uses: vi-inspector/vi-inspector@v1
  with:
    path: 'src/'
    fail-on: high
    baseline: .vi-inspector-baseline.json
    sarif: true   # needs security-events: write

Adopting on an existing codebase? Bless the current state, then gate on regressions:

vi-inspector review src/ --update-baseline .vi-inspector-baseline.json
# commit the baseline; CI now fails only on NEW findings

Other useful flags: --json, --sarif FILE, --html OUT_DIR, --ignore-parse-errors. Under GITHUB_ACTIONS, file-level ::error/::warning annotations are emitted automatically.

Rule catalog

Rule Severity What it flags
ERR-1 high / medium Unwired error terminals on SubVI calls. Unwired error out → high (errors silently dropped). Unwired error in with error-out wired → medium (node runs even when upstream errored). Error-handler VIs are exempt (chain terminators by design).
ERR-1b medium Broken error chain on primitives: error-in wired but error-out unwired. Node names include method/property names (e.g. Invoke Node 'FP.Close').
ERR-2 high Connector pane exposes error in/out but no error cluster is wired anywhere on the diagram.
RACE-1 medium Local variables (one summarized finding per VI — they break dataflow and risk races).
CPLX-1 info Diagrams over 50 nodes — consider splitting into subVIs.

Precision: every rule was audited against genuine LabVIEW-rendered block diagrams (15 findings sampled, verified by hand). ERR-1 true-positive rate 75%, RACE-1 and CPLX-1 100%. A former WIRE-1 rule ("unwired SubVI inputs") was removed after the audit found 0% actionable hits — method-call nodes expose phantom terminals in the parsed model and the rest were optional-with-defaults noise. A precise version needs cross-VI connector-pane analysis and is tracked as a planned rule.

Compatibility

Verified against 106 real .vi files — see docs/COMPATIBILITY.md:

Saved in Files Status
LabVIEW 21.0 103 ✓ full review
LabVIEW 14.0 2 ✓ full review
LabVIEW 8.6 1 ✗ known limitation (diagram extraction fails)

Untested versions are untested — no claim is made about them.

How it works

  • pylabview (MIT) reads the RSRC binary container: version, blocks, connector pane, dependencies.
  • lvkit 0.8.6 (Apache-2.0) parses block diagrams semantically (nodes, terminals, wires) and renders diagrams.
  • vi_inspector/review.py runs the rules; report.py builds the HTML dashboard.

Development

python3 -m venv .venv && .venv/bin/pip install -e ".[dev]"  # or: pip install -r requirements.txt
.venv/bin/python -m pytest tests/ -q

License

MIT — see LICENSE. "LabVIEW" is a trademark of National Instruments / Emerson; this project is not affiliated with or endorsed by NI or Emerson.

Metadata

Release files for vi-inspector 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vi-inspector 1.0.0
File Size Uploaded
vi_inspector-1.0.0.tar.gz 6.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for vi-inspector 1.0.0
File Interpreter ABI Platform
vi_inspector-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.6 MB

Release files / vi_inspector-1.0.0.tar.gz

Download URL vi_inspector-1.0.0.tar.gz
Size 6.6 MB
Tags Source
SHA-256 checksum
How to use checksums
0c48aec7e9770b5fcebbd8c469bcf171d116f6d0bf8faba5b4f65e17f2dea36f
BLAKE2b-256 checksum
How to use checksums
96e47b3e9c9a5efd1bd6ac6cec09aa8db516f0988ca57aefb64de2ee957dcb00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / vi_inspector-1.0.0-py3-none-any.whl

Download URL vi_inspector-1.0.0-py3-none-any.whl
Size 21.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5f04b339efb926c62a121b24282a7e1d70ee9fd51ca8f96846afff17e42dcf0
BLAKE2b-256 checksum
How to use checksums
8ea52199cd2c97cb0a155989378044dbd9a9ebbf69d10b7907e125fdef090862
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release 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