Codacy Quality Check
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Codacy Quality Check相关的知识,希望对你有一定的参考价值。
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的主要内容,如果未能解决你的问题,请参考以下文章
Codacy:一个新的容易使用的代码质量和审查自动化解决方案
The 2016 Asia Regional Contest, Tsukuba Quality of Check Digits Gym - 101158B
Quality assessment and quality control of NGS data