Add `compile-commands` check: compile_commands.json is exported

Đang mở
#23 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
74/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cmake, python
Lĩnh vực
build-system, tooling

Hướng nghiên cứu

Start by reading the checks and tests in this Python project to see how existing checks detect settings in CMake files, presets, and CI. Add a warning-level compile-commands check that passes when CMAKE_EXPORT_COMPILE_COMMANDS is enabled; use the linked StandardProjectSettings.cmake as the reference. Done means tests cover enabled and missing settings across the stated sources.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Check

New check compile-commands.

Passes when CMAKE_EXPORT_COMPILE_COMMANDS is enabled in CMake files, presets, or CI, so clang-based tooling (clang-tidy, clangd, IDEs) can be used.
Fails otherwise. (Warning-level.)

Reference

set(CMAKE_EXPORT_COMPILE_COMMANDS ON) in cmake/StandardProjectSettings.cmake.


Part of #9. Reference implementation: cpp-best-practices/cmake_template.


Triage (language-neutral review): still valid for C/C++. Meson always writes compile_commands.json, so Meson projects pass automatically. Python and Rust: SKIP. Unblocked: build-system rules exist now (#59); this is a rule on the CMake (and Meson) BuildSystem.

Ngôn ngữ chính
Python
Star
4
Fork
1
Merge trung bình
10 giờ 41 phút
Pull request đã merge (30 ngày)
79

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cpp-best-practices/project_validator

Tất cả issue của cpp-best-practices/project_validator

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.