Skip to main content

GitHub Actions Integration

ignition-lint ships as a composite GitHub Action that you can add to any workflow.

Quick Start​

Create .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:
files: "**/view.json"
component_style: "PascalCase"
parameter_style: "camelCase"

Action Inputs​

InputRequiredDefaultDescription
filesNo**/view.jsonComma-separated file globs to lint
component_styleNoPascalCaseNaming convention for components
parameter_styleNocamelCaseNaming convention for parameters
component_style_rgxNo—Custom regex for component names
parameter_style_rgxNo—Custom regex for parameter names
allow_acronymsNofalseAllow acronyms in names
project_pathNo—Path to Ignition project directory
lint_typeNoperspectiveType of linting: perspective, scripts, or all
naming_onlyNotrueOnly run naming convention checks
ignore_codesNo—Comma-separated rule codes to suppress
schema_modeNorobustSchema strictness: strict, robust, or permissive
fail_onNoerrorMinimum severity that causes a non-zero exit: error, warning, info, style
componentNo—Filter Perspective linting to a specific component type prefix
versionNolatestVersion of ignition-lint-toolkit to install from PyPI

Action Outputs​

OutputDescription
resultsuccess or failure

Examples​

Full project lint​

- uses: TheThoughtagen/ignition-lint@v1
with:
project_path: .
lint_type: all
naming_only: "false"

Naming only with acronym support​

- uses: TheThoughtagen/ignition-lint@v1
with:
files: "**/view.json"
component_style: "PascalCase"
parameter_style: "camelCase"
allow_acronyms: "true"

Custom regex patterns​

- uses: TheThoughtagen/ignition-lint@v1
with:
files: "**/view.json"
component_style_rgx: "^[A-Z][a-zA-Z0-9]*$"
parameter_style_rgx: "^[a-z][a-zA-Z0-9]*$"

Suppress rules during adoption​

- uses: TheThoughtagen/ignition-lint@v1
with:
project_path: .
lint_type: all
ignore_codes: "NAMING_PARAMETER,MISSING_DOCSTRING,LONG_LINE"

How It Works​

The action:

  1. Sets up Python 3.10
  2. Installs ignition-lint-toolkit from PyPI (pip install ignition-lint-toolkit)
  3. Runs ignition-lint-action with environment variables mapped from the action inputs
  4. Exits with code 0 on success or 1 on failure

Environment Variables​

The action entry point reads inputs from INPUT_* environment variables. You can also invoke it directly:

export INPUT_FILES="**/view.json"
export INPUT_COMPONENT_STYLE="PascalCase"
export INPUT_PARAMETER_STYLE="camelCase"
export INPUT_IGNORE_CODES="NAMING_PARAMETER"
ignition-lint-action