Metadata-Version: 2.4
Name: lint-tool
Version: 2026.9.14
Summary: lintrunner adapters for C++/Python/CMake repositories
Author: KhwarizmiAnalytix
License-Expression: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/KhwarizmiAnalytix/lint-tool
Project-URL: Source, https://github.com/KhwarizmiAnalytix/lint-tool
Project-URL: Issues, https://github.com/KhwarizmiAnalytix/lint-tool/issues
Keywords: lintrunner,lint,clang-format,ruff,cmake
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
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: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: tomli>=2.0; python_version < "3.11"
Provides-Extra: test
Requires-Dist: pytest>=7.0; extra == "test"
Dynamic: license-file

# lint-tool

lintrunner adapters for C++/Python/CMake repositories. Host repos own
policy (`.lintrunner.toml`, `.clang-format`, `pyproject.toml`); this
package owns the adapter implementations.

```bash
pip install lint-tool
```

Invoke adapters through lintrunner:

```toml
[[linter]]
code = 'CLANGFORMAT'
include_patterns = ['**/*.cpp', '**/*.h']
exclude_patterns = ['ThirdParty/**']
command = [
    'python3',
    '-m',
    'lint_tool.adapters.clangformat_linter',
    '--binary=clang-format',
    '--',
    '@{{PATHSFILE}}',
]
init_command = [
    'python3',
    '-m',
    'lint_tool.adapters.pip_init',
    '--dry-run={{DRYRUN}}',
    'clang-format==19.1.4',
]
```

Adapters find the consumer root by walking up from cwd for
`.lintrunner.toml` or `.git`, or from `LINTRUNNER_HOST_ROOT`. They do not
assume an XSigma `Tools/linter/adapters` layout.

A Logging/Parallel-sized menu is typically CLANGFORMAT, CMAKE,
CMAKEFORMAT, EDITORCONFIG, NEWLINE, and CODESPELL. Do not copy a full
XSigma `.lintrunner.toml`.

```bash
python3 -m lint_tool                 # list usage
python3 -m lint_tool.adapters.ruff_linter --help
python3 -m pytest tests/             # from a clone, after pip install -e ".[test]"
```

Source: https://github.com/KhwarizmiAnalytix/lint-tool
