Skip to main content

ort-lint

Lint and format ONNX Runtime code. Use this skill when asked to lint, format, or check code style for C++ or Python files in ONNX Runtime.

Informações da origem

Repositório
microsoft/onnxruntime
Última atividade na origem
21 de agosto de 2026 às 01:04
Idioma detectado do SKILL.md
inglês
Estrelas
22.175
Forks
4.366

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
name
ort-lint
description
Lint and format ONNX Runtime code. Use this skill when asked to lint, format, or check code style for C++ or Python files in ONNX Runtime.
# Linting and Formatting ONNX Runtime Code ONNX Runtime uses [lintrunner](https://github.com/suo/lintrunner) for both C++ (clang-format) and Python (ruff). ## Setup (one-time) ```bash pip install -r requirements-lintrunner.txt lintrunner init ``` ## Commands ```bash lintrunner -a # auto-fix changed files lintrunner -a --all-files # auto-fix all files lintrunner -a path/to/file.py path/to/other_file.cc # auto-fix specific files lintrunner f --all-files # format Python files only lintrunner # check without fixing (dry run) ``` ## Style rules ### C++ - Google C++ Style with modifications (see `docs/Coding_Conventions_and_Standards.md` for full details) - Max line length: 120 characters, but **aim for 80** when possible - Configured in `.clang-format` and `.clang-tidy` ### Python - Google Python Style Guide (extension of PEP 8) - Max line length: 120 characters - Configured in `pyproject.toml` ## Agent tips - **Activate a Python virtual environment** before installing dependencies. See "Python > Virtual environment" in `AGENTS.md`. - If lintrunner is not yet set up, install and initialize first (see [Setup](#setup-one-time)). - Prefer `lintrunner -a` (changed files only) over `--all-files` unless the user asks for a full sweep.
Ver no GitHub