ort-lint

โดย microsoft

ตรวจสอบและจัดรูปแบบโค้ด ONNX Runtime ใช้ทักษะนี้เมื่อถูกขอให้ตรวจสอบ จัดรูปแบบ หรือตรวจสอบสไตล์โค้ดสำหรับไฟล์ C++ หรือ Python ใน ONNX Runtime

npx skills add https://github.com/microsoft/onnxruntime --skill ort-lint

Linting and Formatting ONNX Runtime Code

ONNX Runtime uses lintrunner for both C++ (clang-format) and Python (ruff).

Setup (one-time)

pip install -r requirements-lintrunner.txt
lintrunner init

Commands

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).
  • Prefer lintrunner -a (changed files only) over --all-files unless the user asks for a full sweep.

Skills เพิ่มเติมจาก microsoft

oss-growth
microsoft
บุคลิกภาพนักเติบโตโอเอสเอส
official
accessibility-aria-expert
microsoft
ตรวจจับและแก้ไขปัญหาการเข้าถึงใน React/Fluent UI webviews ใช้เมื่อตรวจสอบโค้ดเพื่อความเข้ากันได้กับโปรแกรมอ่านหน้าจอ แก้ไขป้ายกำกับ ARIA ทำให้มั่นใจว่า…
official
generate-canvas-app
microsoft
[เลิกใช้งานแล้ว — ใช้ canvas-app แทน] สร้างแอป Canvas ของ Power Apps ที่สมบูรณ์
official
django
microsoft
แนวทางปฏิบัติที่ดีที่สุดสำหรับการพัฒนาเว็บ Django รวมถึงโมเดล วิว เทมเพลต และการทดสอบ
official
github-issue-creator
microsoft
แปลงบันทึกดิบ บันทึกข้อผิดพลาด การเขียนตามคำบอก หรือภาพหน้าจอ ให้เป็นรายงานปัญหาที่ชัดเจนในรูปแบบ GitHub-flavored markdown ใช้เมื่อผู้ใช้วางข้อมูลบั๊ก ข้อผิดพลาด...
official
python-package-management
microsoft
ใช้ uv สำหรับการจัดการ dependencies และ poethepoet สำหรับการทำงานอัตโนมัติ
official
runtime-validation
microsoft
การตรวจสอบความถูกต้องขณะรันไทม์สำหรับแอปพลิเคชันที่ถูกย้าย — ครอบคลุมกลยุทธ์การทดสอบ (ระยะการวางแผน) และการดำเนินการทดสอบ (ระยะการตรวจสอบความถูกต้อง): การตรวจสอบการเริ่มต้นระบบ,…
official
azure-postgres-ts
microsoft
เชื่อมต่อกับ Azure Database for PostgreSQL Flexible Server โดยใช้แพ็กเกจ pg (node-postgres) ที่รองรับการยืนยันตัวตนด้วยรหัสผ่านและ Microsoft Entra ID (แบบไม่ใช้รหัสผ่าน)
official