Skip to main content

Hybrid lint runtime that wraps Ruff and a few source checks behind one result format.

Project description

emergentlinters

A hybrid lint runtime. It runs Ruff for Python and returns every finding in one result object, so callers don't parse a different output format per tool. JavaScript/TypeScript linting runs through the Node toolchain (ESLint plus the bundled rules in rules/); the Python entry points expose the same result object.

Install

pip install emergentlinters

Quick start

from emergentlinters import run_python_linter

result = run_python_linter(["src/"])

print(result.success)          # True when there are no blocking findings
print(result.blocking_count)   # number of blocking findings
print(result.advisory_count)   # number of advisory findings
print(result.raw_output)       # human-readable, tiered summary (see below)

For JavaScript/TypeScript:

import asyncio
from emergentlinters import run_javascript_linter

result = asyncio.run(run_javascript_linter(["app/"]))
print(result.to_payload())

The result object

Every entry point returns a DeterministicLintResult:

Field Type Meaning
success bool True when blocking_count == 0 (and the engine ran).
files_checked list[str] Files that were actually examined.
errors list[str] Blocking findings, one per line.
warnings list[str] Advisory findings, one per line.
raw_output str Tiered, human-readable summary.
engine_success bool False only when the underlying tool crashed.
blocking_count int Count of blocking findings.
advisory_count int Count of advisory findings.

Call result.to_payload() to get a plain dict for serialization.

Output format

raw_output is a directive line plus two optional fenced sections:

<directive level="blocking" blocking="2" advisory="1">...</directive>

**BLOCKING (2)**

[ruff] app.py:3:1: F401 'os' imported but unused [checks] app.py:9:5: EL001 returned value may need review before use


**ADVISORY (1)**

[ruff] app.py:12:80: E501 line too long

Findings are prefixed by their source ([ruff], [eslint], [oxlint], [checks]), and the same finding across many files is collapsed into one entry with the locations listed beneath it.

Source checks

Alongside Ruff, two line-based checks run on Python files and surface under the [checks] source:

  • EL001 — flags return <name> statements.
  • EL002 — flags modules that declare several decorated handlers.

run_javascript_internal adds a relative-import check under the same [checks] source. These are coarse by design — enable the ones that fit your codebase.

JavaScript dependencies

The JS path expects ESLint to be available. Install the bundled dev dependencies with:

emergentlinters-install-js

License

Apache-2.0. See LICENSE.

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

emergentlinters-0.1.0.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

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

emergentlinters-0.1.0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for emergentlinters-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b89df4a7837d32e203bdcb951a31f1acb1da1632abe2cdb6335dc445e9bffb3c
MD5 cc0cb60993f947410771d10db3e8a9ce
BLAKE2b-256 d426f36a6ea4b8e949e31d1a1b6698769d64cc1861f7fd5f0a9c04efdbd4fa83

See more details on using hashes here.

Provenance

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

Publisher: ci.yml on emergentbase/emergentlinters

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

File details

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

File metadata

File hashes

Hashes for emergentlinters-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a3c21f12373f0eb0b77d56219e90c7e5e2e9ccd61aecbcb9f052edee4e8fd65a
MD5 0bed4563a89fd9573286ae6b66659972
BLAKE2b-256 202b7bfae8adea555368eedcbb7f09fab5750f037e99a3d08531b47e42e7607b

See more details on using hashes here.

Provenance

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

Publisher: ci.yml on emergentbase/emergentlinters

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