C++ 代码规范 cppcheck 样式修改

/*
 * style
 */
    1.Using C-style cast.  Use reinterpret_cast(...) instead  [readability/casting]

        const_cast(BT_VER)
        reinterpret_cast(BT_VER)

    2.Do not use namespace using-directives.  Use using-declarations instead.
      (不要使用命名空间using指令。请改用using声明)
        使用 using std::thread 替代 using namespace std;

    3.Should have a space between // and comment  [whitespace/comments] [4]
        注释后面加一个空格

    4. { should almost always be at the end of the previous line
        把函数的括号移到函数参数 ) 后面,即不要换行;
    
    5.Redundant blank line at the start of a code block should be deleted.
      (应删除代码块开头的多余空行)
        空函数{}之间不能有空行

    6.Line ends in whitespace.
        删除结尾空格

    7.Missing space before ( in for(
        for需有一个空格

    8.Missing spaces around =  [whitespace/operators]
        等号两边有空格

    9.Weird number of spaces at line-start.  Are you using a 2-space indent?
        行起始处有空格
    
    10.At least two spaces is best between code and comments
        注释前最少有两个空格

    11.Missing space after ,  [whitespace/comma] [3]
        参数之间要有空格

    12.If/else bodies with multiple statements require braces
        具有多个语句的If/else实体需要大括号

    13.Extra space before )
        ) 前后有空格

    14.Missing space before ( in if(
        if需有一个空格

你可能感兴趣的:(C/C++,c++)