Menu

CSV Report

2019-12-10
2024-10-12
  • John Coffey

    John Coffey - 2019-12-10

    Before 1.90 is released, I think it would be useful if the following patch was applied. Basically when saving the results to a CSV file, the Title line and the ID column are missing. I've been maintaining this patch in my local checkout/build area. Also, this is how I build the code (QT based GUI with Rules & QCharts) in Windows X64.

    It works fine (expecially recently the misra stuff started to get way faster). The only thing is that the GUI launches and also launches a separate command window showing the warnings and status during the checking. Normally this has to do with the linker SUBSYSTEM:WINDOWS vs SUBSYSTEM:CONSOLE but I am not sure, I had limited success getting the background window to disappear and to have an icon correctly associated with the target executable.

    John

    Here is my build procedure:

    Make sure that git, cmake and qt bin folder are present in my path.

    Change to the root of the cppcheck folder & update the code - note the stashing here to allow the pull to complete.

    git stash
    git pull
    git pop
    mkdir -p build/release
    cd build/release
    build\release>cmake -GNinja -DHAVE_RULES=ON -DBUILD_GUI=ON -DCMAKE_BUILD_TYPE:STRING=RELEASE -DCMAKE_INSTALL_PREFIX=c:\tools\cppcheck-dev -DUSE_MATCHCOMPILER=ON -DWITH_QCHART=ON -DANALYZE_DATAFLOW=ON ../..
    ninja install

    Also is there documentation on the ANALYZE_DATAFLOW?

     
  • versat

    versat - 2019-12-12

    Can you create a Pull Request at https://github.com/danmar/cppcheck ?

     
  • B Wiese

    B Wiese - 2024-10-08

    Apologies for reviving this old thread... but does the CSV Report output option currently exist now? I did not see it mentioned in the manual and do not see how to generate the CSV Report on the command line.

    From the standard HTML output, I noticed that after the "filename" listed, the output columns are: "Line (number), (Defect) ID, CWE, Severity, Message" with the left panel for toggling which Defect ID to show and the number of each. However, the classCsvReport.html page and csvreport_8cpp_source.html shows what looks like only the header lines "File, Line, Severity, Id, Summary". Is the Common Weaknesses & Exposures (CWE) number not provided in the CSV Report?

    PS - I am attempting to identify security vulnerability related findings based on CWE reference.

     
  • Daniel Marjamäki

    To generate a CSV report I recommend the --template option. There is a CSV output example in the chapter "Reformatting the text output" in the manual.

    Is the Common Weaknesses & Exposures (CWE) number not provided in the CSV Report?

    You have {cwe} in the --template format.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.