compile_commands.json compiler path misreads \\ path separator

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

Maintainer thường phản hồi trong vòng 8 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
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
cmake, cpp, python
Lĩnh vực
build-system, cli

Hướng nghiên cứu

The bug is in how CodeChecker.exe analyze reads the compiler path from a CMake-generated compile_commands.json on Windows, where backslashes appear doubled. Reproduce with the command in the issue on a small compile_commands.json that has escaped backslashes, then find where the binary path is read and normalized. Done means the analyzer finds X:\x64-release\llvm19\bin\clang++.exe on Windows and the logged path matches it.

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

Mô tả

good to go :rocket: platform-Windows 🖥
$ codechecker analyze ./compile_commands.json --enable sensitive --output ./codechecker
[ERROR 2024-12-13 09:29] - Binary X:x64-releasellvm19binclang++.exe not found
...

Correct path is X:\x64-release\llvm19\bin\clang++.exe. In compile_commands.json the path shows as X:\\x64-release\\llvm19\\bin\\clang++.exe. It is generated by CMake 3.30.3.

$ CodeChecker.exe version
[INFO 2024-12-13 09:39] - CodeChecker analyzer version:
---------------------------------------------------------------
Kind                 | Version
---------------------------------------------------------------
Base package version | 6.24.4
Package build date   | 2024-10-28T15:46
Git commit ID (hash) | 454d978191ed42c8202a2244dc092dfb6fd8c83a
Git tag information  | 6.24.4
---------------------------------------------------------------

[INFO 2024-12-13 09:39] - CodeChecker web version:
------------------------------------------------------------------------------
Kind                                | Version
------------------------------------------------------------------------------
Base package version                | 6.24.4
Package build date                  | 2024-10-28T15:46
Git commit ID (hash)                | 454d978191ed42c8202a2244dc092dfb6fd8c83a
Git tag information                 | 6.24.4
Server supported Thrift API version | 6.58
Client Thrift API version           | 6.58
------------------------------------------------------------------------------
Ngôn ngữ chính
Python
Star
2.6k
Fork
494
Merge trung bình
6 ngày 13 giờ
Pull request đã merge (30 ngày)
18

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

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 Ericsson/codechecker

Tất cả issue của Ericsson/codechecker

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.