首页 > 其他 > 详细

Codacy Quality Check

时间:2018-04-10 11:36:33      阅读:306      评论:0      收藏:0      [点我收藏+]
Codacy Quality CheckList
  • Variable ‘var‘ is reassigned a value before the old one has been used.

    double scaleFactor = 1.0;
    UnitTypeEnum bodyLenUnit = kUnitType_NULL;
    object->LengthUnit(bodyLenUnit);
    scaleFactor = ParasolidBridgeUtility::UnitScaleFactor(bodyLenUnit);
  • Prefer prefix ++/-- operators for non-primitive types.

    for (iter=innerLoopVec.begin(); innerLoopVec.end()!=iter; iter++)
    {
    ...
    }
  • Assignment of function parameter has no effect outside the function.

    void Foo(A* pA) 
    {
    delete pA;
    pA = nullptr;
    }
  • Class ‘XXX‘ has a constructor with 1 argument that is not explicit.

    class A
    {
    public:
    A(int){} //default contruct won‘t be provided
    };
  • The scope of the variable ‘var‘ can be reduced.
  • Array index ‘j‘ is used before limits check.
    while ( name.Text[j] != ‘>‘ && j < name.TextLength )
    {
        ...
    }

Codacy Quality Check

原文:http://blog.51cto.com/xqtyler/2096395

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!