Metadata-Version: 2.5
Name: alinter
Version: 0.1.0
Summary: A universal, config-driven linter: lint any language or format with declarative rules.
Project-URL: Homepage, https://github.com/Baba01hacker666/alinter
Project-URL: Repository, https://github.com/Baba01hacker666/alinter
Project-URL: Issues, https://github.com/Baba01hacker666/alinter/issues
Project-URL: Changelog, https://github.com/Baba01hacker666/alinter/blob/main/CHANGELOG.md
Author: baba01hacker
License: MIT
License-File: LICENSE
Keywords: code-quality,codestyle,config-driven,lint,linter,static-analysis,universal
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: pyyaml>=5.4
Requires-Dist: tomli>=1.1.0; python_version < '3.11'
Provides-Extra: dev
Requires-Dist: bandit>=1.7; extra == 'dev'
Requires-Dist: build>=1.0; extra == 'dev'
Requires-Dist: defusedxml>=0.7; extra == 'dev'
Requires-Dist: pyflakes>=3.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Provides-Extra: gitignore
Requires-Dist: pathspec>=0.11; extra == 'gitignore'
Provides-Extra: xml
Requires-Dist: defusedxml>=0.7; extra == 'xml'
Description-Content-Type: text/markdown

# alinter

**A universal, config-driven linter.** Rules are data, not code, and language
support ships as presets — so you can lint any language, format, or bespoke DSL
with one tool and one config, without changing the linter.

- 🧩 **Language agnostic** — rules are plain YAML/JSON/TOML.
- 📦 **Presets, not rebuilds** — add a language by dropping in a file.
- ✍️ **Your rules, anywhere** — one-off checks for obscure formats are trivial.
- 🔧 **Auto-fix** — whitespace, newlines, line endings, and patterns.
- 📊 **Many outputs** — `text`, `json`, `sarif`, `junit`, `github`.
- 🪝 **Plugins** — custom check types via entry points.

## Install

```bash
pip install alinter
```

Python 3.9+ and PyYAML (plus `tomli` on older Pythons). Optional extras:
`alinter[gitignore]` for `.gitignore`-aware discovery, `alinter[xml]` to harden
XML parsing with `defusedxml`.

## Quick start

```bash
alinter                  # lint the current directory
alinter check src/       # lint specific paths
alinter init             # write a starter .alinter.yaml
alinter --fix            # apply automatic fixes
alinter --format sarif > alinter.sarif
```

## How it works

Discover files → detect each file's language (extension, name, or shebang) →
select the rules that apply (always-on baseline + matching language presets +
your own) → run each check → report, optionally fixing. See
[`docs/how-it-works.md`](docs/how-it-works.md).

## Configuration

alinter reads `.alinter.yaml`, `alinter.yml`, `.alinter.json`, `.alinter.toml`,
or a `[tool.alinter]` table in `pyproject.toml`, walking up from the working
directory. A global config at `~/.config/alinter/config.yaml` is merged
underneath. A minimal config:

```yaml
version: 1
extends: [python, yaml]          # force extra presets on
exclude: ["**/vendor/**"]
ignore: ["generic/line-ending"]  # turn rules off by id (globs ok)

rules:
  - id: custom/no-todo
    type: regex
    pattern: '\b(TODO|FIXME)\b'
    mode: forbidden
    severity: info
    message: "unresolved {match} marker"
```

A rule entry **without** a `type` overrides an existing rule by id. Full details
are in [`docs/configuration.md`](docs/configuration.md) and
[`docs/rules.md`](docs/rules.md). Run `alinter presets`, `alinter types`, and
`alinter --help` for the live reference.

## Documentation

Everything else lives in [`docs/`](docs/README.md):

- [How it works](docs/how-it-works.md) · [Configuration](docs/configuration.md) · [Rules](docs/rules.md)
- [Checks](docs/checks.md) · [Presets](docs/presets.md) · [Suppressions](docs/suppressions.md)
- [Plugins](docs/plugins.md) · [Reporters](docs/reporters.md) · [CLI](docs/cli.md)
- [Python API](docs/python-api.md) · [Development](docs/development.md) · [FAQ](docs/faq.md)

Contributors should also read [`AGENTS.md`](AGENTS.md),
[`CONTRIBUTING.md`](CONTRIBUTING.md), and [`SECURITY.md`](SECURITY.md).

## License

MIT © baba01hacker
