Comprehensive Ignition linting tool with naming conventions and empirical validation. Extends ia-eknorr/ignition-lint with enhanced features.
Project description
ignition-lint
A comprehensive linting toolkit for Ignition SCADA projects that catches errors before runtime, enforces best practices, and maintains code quality across your industrial automation systems.
This project extends the foundational work by Eric Knorr in ia-eknorr/ignition-lint, which pioneered naming convention validation for Ignition view.json files. See credits for the full story.
Why ignition-lint?
Catch errors before they reach runtime
- Detect Jython syntax errors in onChange scripts and bindings
- Find malformed expression bindings and property references
- Validate against production-tested JSON schemas
Maintain consistent standards across teams
- Enforce naming conventions for components, parameters, and properties
- Flag deprecated API usage (
printstatements,.iteritems(),xrange()) - Identify code smells like hardcoded URLs and overridden
systemvariables
Improve performance and maintainability
- Detect
now()expressions with inefficient polling intervals - Find unreferenced custom properties and parameters
- Warn about fragile component traversal (
getSibling(),getChild())
Integrate everywhere
- GitHub Actions for automated PR checks
- Pre-commit hooks for local validation
- CLI for CI/CD pipelines
- MCP server for AI-assisted development
Installation
pip install ignition-lint-toolkit
Or with uv:
uv pip install ignition-lint-toolkit
Verify the install:
ignition-lint --help
Optional: MCP server support
pip install "ignition-lint-toolkit[mcp]"
Quick start
Install
pip install ignition-lint-toolkit
Lint your first project
# Lint any directory - finds all view.json and .py files
ignition-lint --target /path/to/your/project
# Or lint a full Ignition project (standard layout)
ignition-lint --project /path/to/ignition/project --profile full
See what it catches
# Example output:
ERROR: JYTHON_SYNTAX_ERROR in MyView/view.json:45
Syntax error in onChange script: unexpected indent
WARNING: EXPR_NOW_DEFAULT_POLLING in Dashboard/view.json:12
now() defaults to 1000ms polling - specify explicit interval: now(5000)
WARNING: NAMING_COMPONENT in Home/view.json:8
Component 'Label' should use PascalCase: 'StatusLabel'
INFO: UNUSED_CUSTOM_PROPERTY in Settings/view.json:23
Custom property 'debugMode' is defined but never referenced
Common use cases
# Pre-deployment validation
ignition-lint --project ./production --fail-on error
# Focus on one component type
ignition-lint -t ./views --component ia.display.label
# JSON output for CI/CD pipelines
ignition-lint -t ./project --report-format json > lint-report.json
# Suppress rules during gradual adoption
ignition-lint -t ./legacy --ignore-codes NAMING_PARAMETER,MISSING_DOCSTRING
What it checks
| Category | Examples |
|---|---|
| Perspective schema | Component structure, binding types, transform validity, missing props |
| Expressions | now() polling intervals, unknown functions, malformed property refs, fragile component traversal |
| Naming conventions | Component, parameter, and custom property naming (PascalCase, camelCase, snake_case, or custom regex) |
| Jython inline scripts | Syntax errors, indentation, print statements, hardcoded URLs, missing error handling |
| Standalone scripts | Python syntax, docstrings, deprecated APIs, system overrides, line length |
| Unused properties | Unreferenced custom and params properties per view |
Severity levels
| Level | Meaning |
|---|---|
| ERROR | Critical issues that cause runtime failures |
| WARNING | Compatibility or best practice issues |
| INFO | Informational insights and suggestions |
| STYLE | Code style and documentation improvements |
Lint suppression
Three mechanisms let you control which rules fire and where:
--ignore-codesflag -- suppress rules globally for an entire run.ignition-lintignorefile -- gitignore-style patterns with optional rule scoping per path- Inline comments --
# ignition-lint: disable=CODEdirectives in Python scripts
See the suppression guide for the full reference.
Integrations
🔄 GitHub Actions
Automatically lint PRs and commits. Add to .github/workflows/ignition-lint.yml:
name: Ignition Lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: TheThoughtagen/ignition-lint@v1
with:
project_path: .
lint_type: all
fail_on: error
ignore_codes: "NAMING_PARAMETER" # Suppress during migration
🪝 Pre-commit hooks
Catch issues before they're committed:
# .pre-commit-config.yaml
repos:
- repo: https://github.com/TheThoughtagen/ignition-lint
rev: v1
hooks:
- id: ignition-perspective-lint
🤖 MCP server (AI agents)
Enable AI assistants like Claude to lint your Ignition projects:
pip install "ignition-lint-toolkit[mcp]"
ignition-lint-server
🛠️ Editor integration
VS Code / ignition-nvim
Use with language servers for real-time feedback. See Editor Integration Guide for setup with:
- VS Code with JSON schema validation
- Neovim with ignition-nvim
- LSP-compatible editors
Tooling overview
| Command | Purpose |
|---|---|
ignition-lint |
CLI entry point for project and file linting |
ignition-lint-server |
FastMCP server for AI agent integrations |
ignition-lint-action |
Wrapper used by the GitHub Action |
Documentation
Full documentation at TheThoughtagen.github.io/ignition-lint:
Contributing
Contributions are welcome! See CONTRIBUTING.md for development setup, project structure, and guidelines.
License
MIT © 2025 Patrick Mannion
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 ignition_lint_toolkit-1.3.0.tar.gz.
File metadata
- Download URL: ignition_lint_toolkit-1.3.0.tar.gz
- Upload date:
- Size: 425.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1789ad42f364594b0f843dba6df6792393df37c086f09f8b93a50b455992e3cd
|
|
| MD5 |
8b57da0fef220bba196b06aa2403f0e7
|
|
| BLAKE2b-256 |
e6b40bf2749604ece2b80677c853e0c0f2884d917150750dc98971f19afb1613
|
Provenance
The following attestation bundles were made for ignition_lint_toolkit-1.3.0.tar.gz:
Publisher:
release.yml on TheThoughtagen/ignition-lint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ignition_lint_toolkit-1.3.0.tar.gz -
Subject digest:
1789ad42f364594b0f843dba6df6792393df37c086f09f8b93a50b455992e3cd - Sigstore transparency entry: 992233191
- Sigstore integration time:
-
Permalink:
TheThoughtagen/ignition-lint@1fd0378e4b95a9c22ad013b3e9fd9d8e5bf58fad -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/TheThoughtagen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1fd0378e4b95a9c22ad013b3e9fd9d8e5bf58fad -
Trigger Event:
push
-
Statement type:
File details
Details for the file ignition_lint_toolkit-1.3.0-py3-none-any.whl.
File metadata
- Download URL: ignition_lint_toolkit-1.3.0-py3-none-any.whl
- Upload date:
- Size: 67.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e45cd62e3ffc8c21c3c15960c1efc7df031f27f4475686b17e1656b52d0cbc46
|
|
| MD5 |
1d91cecc2e47452e0a8ecd007837b528
|
|
| BLAKE2b-256 |
1319246203c1ece030fd7373cbf4b298020fa4f82c062ea1e8290d85ba12a25f
|
Provenance
The following attestation bundles were made for ignition_lint_toolkit-1.3.0-py3-none-any.whl:
Publisher:
release.yml on TheThoughtagen/ignition-lint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ignition_lint_toolkit-1.3.0-py3-none-any.whl -
Subject digest:
e45cd62e3ffc8c21c3c15960c1efc7df031f27f4475686b17e1656b52d0cbc46 - Sigstore transparency entry: 992233203
- Sigstore integration time:
-
Permalink:
TheThoughtagen/ignition-lint@1fd0378e4b95a9c22ad013b3e9fd9d8e5bf58fad -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/TheThoughtagen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1fd0378e4b95a9c22ad013b3e9fd9d8e5bf58fad -
Trigger Event:
push
-
Statement type: