CodeChecker trashing all C++ files

Aperta
#4,297 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 8 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
22/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp, python
Ambito
cli, compilers

Direzione di ricerca

Start from the CodeChecker analyze invocation on a compile_commands.json generated by xcpretty, and reproduce the 'clang: error: no input files' failure for each C++ entry. Check how the analyzer builds the clang command from each database entry, especially the file argument on macOS. Done when analysis runs on the sample Xcode database and no source files are modified or deleted.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

analyzer :chart_with_upwards_trend: bug :bug: clang sa :dragon: good to go :rocket: platform-macOS 🍎

Describe the bug

I have an Xcode project and I've created the compile_commands.json as follows:

xcodebuild -project path/to/.xcodeproj | \
    xcpretty -r json-compilation-database --output path/for/compile_commands.json

Following the manual, I've then execute CodeChecker as follows:

CodeChecker analyze ./compile_commands.json --enable sensitive --output ./reports

The code checker will then print lots of output as follows:

[ERROR 2024-07-18 15:51] - Analyzing SetText.cpp with clangsa  failed!
[ERROR 2024-07-18 15:51] - 

[ERROR 2024-07-18 15:51] - 
clang: error: no input files

[ERROR 2024-07-18 15:51] - 

[ERROR 2024-07-18 15:51] - 
clang: error: no input files

[ERROR 2024-07-18 15:51] - 

[ERROR 2024-07-18 15:51] - 
clang: error: no input files

[ERROR 2024-07-18 15:51] - 

[ERROR 2024-07-18 15:51] - 
clang: error: no input files

If I after running the analyzer run git status I see that it has trashed every C++ file in my project. I can manually run the compilation commands in the JSON and they work just fine. Paths that it generates to the files are also correct.

CodeChecker version

6.23.1

Expected behaviour

It should actually do the analysis.

Desktop (please complete the following information)

  • OS: MacOS Sonoma 14.5
Lingua principale
Python
Stelle
2.6k
Fork
494
Merge medio
9g 2h
PR unite (30g)
23

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Ericsson/codechecker

Tutte le issue di Ericsson/codechecker

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.