Menu

I can't exclude a protobuf cc file with -i

2022-11-20
2022-11-20
  • guang11cheng

    guang11cheng - 2022-11-20

    [ 16%] Building CXX object src/CMakeFiles/proto.dir/cs_msg.pb.cc.o
    cd /home/hgc/workspace/gitee/hilton/server_proj/src/proto/build/src && /usr/bin/cmake -E time /usr/bin/cmake -E run_co_compile --cppcheck="cppcheck;--suppressions-list=/home/hgc/workspace/gitee/hilton/server_proj/src/proto/../third_party/cppcheck/suppressions.txt;--suppress=cstyleCast;--inline-suppr;--force;--report-progress;--platform=unix64;--enable=warning,style,performance,portability,information;-i /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/common.pb.cc;-i /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc;-i /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg_id.pb.cc;-i /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/ss_msg.pb.cc;-i /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/ss_msg_id.pb.cc" --source=/home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc -- /usr/bin/c++ -Dproto_EXPORTS -I/opt/common_component/Debug/include -I/opt/third_party/debug/protobuf-21.9/include -g -fPIC -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic-errors -Werror --coverage -Wno-shadow -std=gnu++23 -MD -MT src/CMakeFiles/proto.dir/cs_msg.pb.cc.o -MF CMakeFiles/proto.dir/cs_msg.pb.cc.o.d -o CMakeFiles/proto.dir/cs_msg.pb.cc.o -c /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc
    Checking /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc ...
    Checking /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc: proto_EXPORTS=1;GOOGLE_PROTOBUF_NO_RDTSC;__GNUC
    ;aarch64...
    Checking /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc: proto_EXPORTS=1;GOOGLE_PROTOBUF_NO_RDTSC;GNUC;x86_64...
    progress: Tokenize (typedef) 0%
    Checking /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc: proto_EXPORTS=1;PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST;_WIN32...
    progress: Tokenize (typedef) 0%
    Checking /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc: proto_EXPORTS=1;_MSC_VER;INTEL_COMPILER;_WIN32...
    progress: Tokenize (typedef) 0%
    progress: SymbolDatabase 0%
    Checking /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc: proto_EXPORTS=1;_M_X64;__x86_64
    ...
    progress: Tokenize (using) 13%
    Checking /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc: proto_EXPORTS=1;_WIN32...
    progress: Tokenize (typedef) 0%
    progress: SymbolDatabase 0%
    Checking /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc: proto_EXPORTS=1;_WIN32;APPLE;MINGW32...
    progress: Tokenize (using) 99%
    Checking /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc: proto_EXPORTS=1;_WIN32;aarch64;x86_64...
    progress: Tokenize (typedef) 0%
    progress: SymbolDatabase 0%
    Checking /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc: proto_EXPORTS=1;BYTE_ORDER;ORDER_BIG_ENDIAN...
    progress: TemplateSimplifier::simplifyTemplateInstantiations() 0%
    Checking /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc: proto_EXPORTS=1;BYTE_ORDER;ORDER_LITTLE_ENDIAN...
    progress: Tokenize (typedef) 0%
    progress: SymbolDatabase 0%
    Checking /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc: proto_EXPORTS=1;GNUC;x86_64...
    progress: Tokenize (using) 99%
    Checking /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc: proto_EXPORTS=1;QNX;aarch64...
    progress: Tokenize (typedef) 0%
    progress: SymbolDatabase 0%
    Checking /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc: proto_EXPORTS=1;aarch64...
    progress: Tokenize (using) 99%
    /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc:3038:16: style: Consider using std::accumulate algorithm instead of a raw loop. [useStlAlgorithm]
    total_size +=
    ^
    Elapsed time: 207 s. (time), 0.00036 s. (clock)
    [ 33%] Building CXX object src/CMakeFiles/proto.dir/cs_msg_id.pb.cc.o
    cd /home/hgc/workspace/gitee/hilton/server_proj/src/proto/build/src && /usr/bin/cmake -E time /usr/bin/cmake -E __run_co_compile --cppcheck="cppcheck;--suppressions-list=/home/hgc/workspace/gitee/hilton/server_proj/src/proto/../third_party/cppcheck/suppressions.txt;--suppress=cstyleCast;--inline-suppr;--force;--report-progress;--platform=unix64;--enable=warning,style,performance,portability,information;-i /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/common.pb.cc;-i /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc;-i /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg_id.pb.cc;-i /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/ss_msg.pb.cc;-i /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/ss_msg_id.pb.cc" --source=/home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg_id.pb.cc -- /usr/bin/c++ -Dproto_EXPORTS -I/opt/common_component/Debug/include -I/opt/third_party/debug/protobuf-21.9/include -g -fPIC -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic-errors -Werror --coverage -Wno-shadow -std=gnu++23 -MD -MT src/CMakeFiles/proto.dir/cs_msg_id.pb.cc.o -MF CMakeFiles/proto.dir/cs_msg_id.pb.cc.o.d -o CMakeFiles/proto.dir/cs_msg_id.pb.cc.o -c /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg_id.pb.cc

    please look at the msg, I want to exclude cppchecking with -i for the file cs_msg.pb.cc, but the cs_msg.pb.cc file is still checked, and it takes a very long time.

     

    Last edit: guang11cheng 2022-11-20
  • Daniel Marjamäki

    that should work. can you reproduce when executing cppcheck directly with a shorter command?

    try this command:

    cppcheck -i /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc /home/hgc/workspace/gitee/hilton/server_proj/src/proto/src/cs_msg.pb.cc

     
    • Daniel Marjamäki

      I can reproduce also. Thanks for this bug report I think we should fix it.

       
  • Daniel Marjamäki

     
  • guang11cheng

    guang11cheng - 2022-11-20

    thank you

     

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.