Skip to main content

Smart contract linter for the Xian blockchain

Project description

xian-linter

xian-linter is a Python linter specifically for Xian smart contracts. It combines PyFlakes with the structured linter exposed by xian-contracting, so rule violations include stable error codes and source positions.

The published PyPI package name is xian-tech-linter. The import package and console command remain xian_linter and xian-linter.

Quick Start

Base package:

pip install xian-tech-linter

Inline use:

from xian_linter import lint_code_inline

errors = lint_code_inline("def transfer():\n    pass\n")

Principles

  • Keep the package focused on contract linting, not runtime execution.
  • Expose the same rule surface in both inline and server modes.
  • Prefer stable error codes and positions so tooling can build on top of the linter reliably.
  • Keep server mode optional. The core package should still be useful as a local linting dependency.

Key Directories

  • xian_linter/: package code, server entrypoints, and inline API
  • tests/: package and server-mode coverage
  • docs/: repo-local notes and backlog

Validation

uv sync --group dev
uv run ruff check .
uv run ruff format --check .
uv run pytest

Related Docs

Usage Modes

  • Inline/programmatic usage:
from xian_linter import lint_code_inline

errors = lint_code_inline("def transfer():\n    pass\n")
  • Standalone server mode:
pip install "xian-tech-linter[server]"
xian-linter
uvicorn xian_linter.server:create_app --factory --host 0.0.0.0 --port 8000

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

xian_tech_linter-0.3.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

xian_tech_linter-0.3.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file xian_tech_linter-0.3.1.tar.gz.

File metadata

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

File hashes

Hashes for xian_tech_linter-0.3.1.tar.gz
Algorithm Hash digest
SHA256 b8e90c277b013b565e7837ec27b04996db6209f852049c2152ee8b5b181b5c8e
MD5 4aea6b127836734a8c94e1e56a5b4cdd
BLAKE2b-256 2f07b80b0c3539b2547a359c79c470bf9a2e6e7b69d7fec146d1059d03527ab0

See more details on using hashes here.

Provenance

The following attestation bundles were made for xian_tech_linter-0.3.1.tar.gz:

Publisher: release.yml on xian-technology/xian-linter

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

File details

Details for the file xian_tech_linter-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for xian_tech_linter-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b97f85fe418330ce924cdb6cb179b39f28ea3c8f139c46a24ba68a7f8c3b1b25
MD5 b36b48b5bc28b66e8a1032d4eb063ca3
BLAKE2b-256 dd97952f8e2cbe896ced2d603b19837d7ae014a556e808b1e024cff08cf98f84

See more details on using hashes here.

Provenance

The following attestation bundles were made for xian_tech_linter-0.3.1-py3-none-any.whl:

Publisher: release.yml on xian-technology/xian-linter

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