Skip to main content

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ยฎ projects that combines naming convention validation, empirical schema checks, and CI/CD automation.

๐Ÿ™ Acknowledgments: The naming convention validation features in this project were inspired by the excellent work by Eric Knorr in the ia-eknorr/ignition-lint repository. We extend that foundation with broader project linting and automation support.

โœจ Features

  • ๐ŸŽฏ Naming Validation โ€“ Enforces component and parameter styles across view.json files
  • ๐Ÿ“‹ Perspective Linting โ€“ Schema-aware checks against Perspective views, bindings, and event scripts
  • ๐Ÿ”ข Expression Validation โ€“ Detects now() polling issues, unknown functions, and fragile component references in Ignition expressions
  • ๐Ÿ“œ Script Analysis โ€“ Validates inline Jython (from view.json) and standalone Python scripts in script-python directories
  • ๐Ÿ” Unused Property Detection โ€“ Flags unreferenced custom and params properties per view
  • ๐Ÿ”‡ Lint Suppression โ€“ Suppress rules via CLI flags, ignore files, or inline comments
  • โšก FastMCP Server โ€“ Provides AI agent integration for real-time validation workflows
  • ๐Ÿš€ GitHub Action โ€“ Drop-in CI integration for automated linting on push or PR
  • ๐Ÿ”ง CLI Tooling โ€“ --target for any directory, --project for Ignition layouts, JSON output for agents
  • ๐Ÿ“Š Production Data โ€“ Rules validated across 12,220+ real industrial components

๐Ÿ”„ Relationship to ia-eknorr/ignition-lint

Feature ia-eknorr/ignition-lint whiskeyhouse/ignition-lint
View.json naming validation โœ… Core feature โœ… Enhanced implementation
Component style checking โœ… PascalCase, camelCase, etc. โœ… Same styles + custom regex
Parameter style checking โœ… Multiple styles supported โœ… Same + enhanced validation
GitHub Actions integration โœ… Simple action โœ… Enhanced action + examples
CLI tool โŒ Action-only โœ… Full CLI with local development
Project-wide linting โŒ Files only โœ… Entire Ignition projects
Script validation โŒ View.json only โœ… Python/Jython scripts
Empirical validation โŒ Naming only โœ… Production-validated rules
MCP/AI integration โŒ Not available โœ… FastMCP server for AI agents
Installation method GitHub Action only โœ… pip / uv + GitHub Action

When To Use Which

Use ia-eknorr/ignition-lint when you only need the original naming checks and a lightweight GitHub Action.

Use whiskeyhouse/ignition-lint when you want local CLI tooling, broader schema validation, MCP integration, or multiple lint types in CI.

๐Ÿš€ Quick Start

Install

# Install from PyPI
pip install ignition-lint

# Or use uv for workspace management
uv sync

CLI Usage

# Lint any directory recursively (finds view.json + .py files automatically)
ignition-lint --target /path/to/any/folder

# Lint a subdirectory for just Perspective views
ignition-lint -t /path/to/views/MyScreen --checks perspective

# Lint scripts only, JSON output for AI agent / MCP consumption
ignition-lint -t /path/to/scripts --checks scripts --report-format json

# Lint a standard Ignition project with all checks
ignition-lint --project /path/to/project --profile full

# Naming convention validation only
ignition-lint --project /path/to/project --naming-only

# Suppress specific rules globally
ignition-lint --project /path/to/project --profile full --ignore-codes NAMING_PARAMETER,LONG_LINE

GitHub Actions

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: whiskeyhouse/ignition-lint@v1
        with:
          files: "**/view.json"
          component_style: "PascalCase"
          parameter_style: "camelCase"
          ignore_codes: ""  # optional: comma-separated rule codes to suppress

๐Ÿ› ๏ธ Tooling Overview

  • ignition-lint โ€“ CLI entry point for project and file linting
  • ignition-lint-server โ€“ FastMCP server for agent integrations
  • ignition-lint-action โ€“ Wrapper used by the GitHub Action

๐Ÿ“ Project Layout

.
โ”œโ”€โ”€ src/ignition_lint/           # Core package modules (CLI, server, checkers)
โ”œโ”€โ”€ docs/                        # Detailed strategy and integration guides
โ”œโ”€โ”€ examples/                    # Example scripts and views for demo scenarios
โ”œโ”€โ”€ schemas/                     # Component schemas and supporting data
โ”œโ”€โ”€ scripts/                     # Analysis tooling and supporting utilities
โ”œโ”€โ”€ tests/                       # Automated tests
โ”œโ”€โ”€ ignition-lint                # Convenience entry point for the CLI
โ”œโ”€โ”€ action.yml                   # GitHub Action definition
โ”œโ”€โ”€ pyproject.toml               # Project metadata and build configuration
โ””โ”€โ”€ uv.lock                      # Resolved dependency versions (uv)

๐Ÿ“š Documentation Highlights

  • docs/SUPPRESSION.md โ€“ Suppressing rules: CLI flags, ignore files, inline comments
  • docs/IGNITION-LINTER-INTEGRATION.md โ€“ Integrating the linter into Ignition projects
  • docs/LINTER-INTEGRATION-STRATEGY.md โ€“ Recommended adoption patterns
  • docs/VALIDATION-LINTING-STRATEGY.md โ€“ Deep dive into validation methodology
  • examples/ โ€“ Ready-to-run scenarios for demonstrating linting outcomes

๐Ÿ”‡ Lint Suppression

Three mechanisms let you control which rules fire and where:

  1. --ignore-codes flag โ€“ Suppress rules globally across the entire run
  2. .ignition-lintignore file โ€“ Gitignore-style patterns with optional rule scoping per path
  3. Inline comments โ€“ # ignition-lint: disable=CODE directives in Python scripts
# Suppress rules from the command line
ignition-lint -p ./project --profile full --ignore-codes NAMING_PARAMETER,NAMING_COMPONENT
# .ignition-lintignore โ€” place in your --project root
scripts/generated/**
com.inductiveautomation.perspective/views/_REFERENCE/**:NAMING_COMPONENT,GENERIC_COMPONENT_NAME
# ignition-lint: disable-file=MISSING_DOCSTRING
def legacy_helper():
    pass

See docs/SUPPRESSION.md for the full guide including all directive types, pattern syntax, rule code reference, and CI/CD examples.

๐Ÿค– FastMCP Integration

Run the FastMCP server to expose linting capabilities to AI agents:

ignition-lint-server --project /path/to/project

Connect FastMCP-compatible clients to the server for conversational linting, contextual file inspection, and auto-fix suggestions.

๐Ÿงช Testing

Use uv or pytest to run the test suite:

uv run pytest
# or
pytest

๐Ÿ“„ License

MIT License. See LICENSE for details.

Project details


Download files

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

Source Distribution

ignition_lint_toolkit-0.1.0.tar.gz (381.0 kB view details)

Uploaded Source

Built Distribution

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

ignition_lint_toolkit-0.1.0-py3-none-any.whl (50.5 kB view details)

Uploaded Python 3

File details

Details for the file ignition_lint_toolkit-0.1.0.tar.gz.

File metadata

  • Download URL: ignition_lint_toolkit-0.1.0.tar.gz
  • Upload date:
  • Size: 381.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ignition_lint_toolkit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 124d82a03d59fb09618ecde21ffa8039cfaaff83f203ce16a2284e0effa5f9cb
MD5 a69b9f2a9726dc647afa3862448a74c7
BLAKE2b-256 4bda92bcab22630dc13e9be49fdc786bef79f0ef0494f0d8d37f972613a46179

See more details on using hashes here.

Provenance

The following attestation bundles were made for ignition_lint_toolkit-0.1.0.tar.gz:

Publisher: release.yml on WhiskeyHouse/ignition-lint

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

File details

Details for the file ignition_lint_toolkit-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ignition_lint_toolkit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35b2c44273cd1343807642461616f9a80a2a0cfca0140866547e645130a63101
MD5 4d8e70f902c57851abbcd0efff5d3341
BLAKE2b-256 11ba84397f0e206450cd1e187ef036355ec1b45b05b601ac9ba4b590dcf071e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for ignition_lint_toolkit-0.1.0-py3-none-any.whl:

Publisher: release.yml on WhiskeyHouse/ignition-lint

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page