Skip to main content

FactoryLint Logo

🏭 FactoryLint

FactoryLint is a Python CLI tool for linting Azure Data Factory (ADF) resources to ensure they follow consistent, enforceable naming conventions.

It validates pipelines, datasets, linked services, triggers, parameters, and variables using a fully configurable rules file, making it ideal for CI/CD pipelines (Azure DevOps, GitHub Actions) and team-wide governance.


✨ Features

  • ✅ Lint ADF resources:
    • Pipelines
    • Datasets
    • Linked Services
    • Triggers
    • Pipeline & Dataset Parameters
    • Pipeline Variables
  • ⚙️ Fully configurable rules via YAML or JSON
  • 🧠 Automatic ADF resource type detection
  • 📊 Clear, colorized terminal output
  • 💾 Machine-readable JSON report output
  • 🚀 Designed for CI/CD usage
  • 🛠 Simple, predictable CLI interface

📦 Installation

Install from PyPI

pip install factorylint

Local development install

git clone https://github.com/DimaFrank/FactoryLint.git
cd FactoryLint
pip install -e .

🚀 Usage

Initialize project (optional)

Creates the .adf-linter directory used for repo

factorylint init

Lint ADF resources

Run linting against a directory containing ADF resources.

factorylint lint --config ./factorylint.yml --resources .
Option Description
--config Path to rules configuration file (YAML or JSON)
--resources Root directory containing ADF resources
--fail-fast Stop on first error

🗂 Expected Folder Structure

FactoryLint automatically scans these subfolders under --resources:

pipeline/
dataset/
linkedService/
trigger/

Each folder may contain nested subdirectories.

📝 Configuration

The configuration file defines naming and validation rules for each ADF resource type.

Supported formats: YAML (.yml, .yaml) or JSON

The config is validated before linting starts

Invalid configs fail the run immediately (CI-safe)

The default config file name is factorylint.yml.

All rules live under a top-level resources: key. Parameters and variables are configured at the top level.

Naming rules reference

Resource Structure Example
Pipeline PL_<PROJECT>_<ENTITY>_<ACTION> PL_MES_ORDERS_INGEST
Dataset DS_<SOURCE>_<DETAIL...>_<FORMAT> DS_ADLS_CUSTOMERS_PARQUET
Linked Service LS_<ABBR>_<DESCRIPTION...> LS_ADLS_BRONZE
Trigger TR_<TYPE>_<FREQUENCY>_<DESCRIPTION...> TR_SCHEDULE_DAILY_MES_IOT
Parameter p_<name> (lowercase) p_start_date
Variable v_<name> (lowercase) v_row_count

Example factorylint.yml

resources:

  pipelines:
    enabled: true
    naming:
      prefix: "PL_"
      case: "upper"
      separator: "_"
      pattern: "^PL_[A-Z0-9_]+$"
      min_separated_parts: 4
      max_separated_parts: 6
      allowed_actions:
        - INGEST
        - TRANSFORM
        - ORCHESTRATE
        - LOAD
        - COPY
        - EXTRACT
        - PROCESS
      description_required: true
      ignore_folder: "_Config"

  datasets:
    enabled: true
    naming:
      prefix: "DS"
      separator: "_"
      case: "upper"
      pattern: "^[A-Z0-9_]+$"
      required_source_position: 2
      allowed_source_abbreviations:
        "Azure Data Lake Storage Gen2": ADLS
        "Azure SQL Database": ASQL
        "SAP Table": SAPT
        "File System": FILE
      allowed_formats:
        - CSV
        - PARQUET
        - TABLE
        - JSON
        - EXCEL
        - AVRO
        - BIN
        - XML
        - ORC
      min_separated_parts: 4
      max_separated_parts: 8

  linked_services:
    enabled: true
    naming:
      prefix: "LS_"
      case: "upper"
      pattern: "^[A-Z0-9_]+$"
      separator: "_"
      min_separated_parts: 2
      max_separated_parts: 5
      allowed_abbreviations:
        - ADLS
        - ASQL
        - KV
        - ADBR
        - FILE

  triggers:
    enabled: true
    naming:
      prefix: "TR_"
      separator: "_"
      case: "upper"
      pattern: "^[A-Z0-9_]+$"
      min_separated_parts: 4
      max_separated_parts: 7
      allowed_types:
        - SCHEDULE
        - EVENT
      allowed_frequencies:
        - HOURLY
        - DAILY
        - NIGHTLY
        - WEEKLY
        - MONTHLY

parameters:
  enabled: true
  naming:
    prefix: "p_"
    case: "lower"
    pattern: "^[a-z_][a-z0-9_]*$"

variables:
  enabled: true
  naming:
    prefix: "v_"
    case: "lower"
    pattern: "^[a-z_][a-z0-9_]*$"

📊 Output

Terminal output

FactoryLint provides clear, colorized feedback:

❌ pipeline/PL_MES_ORDERS_RUN.json
   - Pipeline 'PL_MES_ORDERS_RUN' has invalid action 'RUN'. Allowed: ['INGEST', 'TRANSFORM', ...]
   - Parameter 'StartDate' must start with prefix 'p_'
✅ pipeline/PL_MES_ORDERS_INGEST.json
✅ dataset/DS_ADLS_CUSTOMERS_PARQUET.json

JSON report

All linting errors are saved to:

.adf-linter/linter_results.json

Example:

{
  "pipeline/PL_MES_ORDERS_RUN.json": [
    "Pipeline 'PL_MES_ORDERS_RUN' has invalid action 'RUN'. Allowed: ['INGEST', 'TRANSFORM', ...]"
  ]
}

🔁 CI/CD Usage (Azure DevOps example)

- task: UsePythonVersion@0
  inputs:
    versionSpec: '3.x'

- script: |
    pip install factorylint
    factorylint lint --config ./factorylint.yml --resources .
  displayName: 'Run FactoryLint'
  • Exit code 1 if errors are found

  • Perfect for gating PRs and enforcing standards

🧠 Design Principles

  • ❌ No hardcoded paths

  • ❌ No assumptions about project layout outside --resources

  • ✅ Fully installable CLI

  • ✅ Deterministic behavior in CI

  • ✅ Clear separation of CLI and core logic

📝 License

This project is licensed under the MIT License. See the LICENSE file for details.

Metadata

Release files for factorylint 0.2.1

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

Source distribution (sdist)

Source distribution for factorylint 0.2.1
File Size Uploaded Provenance Actions
factorylint-0.2.1.tar.gz 20.7 kB Without provenance Details for factorylint-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for factorylint 0.2.1
File Interpreter ABI Platform Actions
factorylint-0.2.1-py3-none-any.whl Python 3 none any Details for factorylint-0.2.1-py3-none-any.whl

Total release size: 42.9 kB

Release files / factorylint-0.2.1.tar.gz

Download URL factorylint-0.2.1.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ac5d48c2504798e915cab4971e2607dd0674e47a91b257056c3c952d15e4b991
BLAKE2b-256 checksum
How to use checksums
ff27f93865f6ec07841914964ba36dc7a8a3bb2922752bf6cc2798b712ee6327
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / factorylint-0.2.1-py3-none-any.whl

Download URL factorylint-0.2.1-py3-none-any.whl
Size 22.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eede3851d603c5d9cb5ff3e0879e932a2f958e72cedc8329e0fc68491c289efc
BLAKE2b-256 checksum
How to use checksums
5fd8fc85fe0e101e4b35c6af77c7b27ce2cff633cbeb9ab8029caf393a9ec002
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Security for factorylint 0.2.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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