I have to check some voilations like this
if(emp.companyName="MyCompany")
ie. Here there should not "MyComapany" hard-code in expression or condition checking.
which rule of CodePro do this.
I have to check some voilations like this
if(emp.companyName="MyCompany")
ie. Here there should not "MyComapany" hard-code in expression or condition checking.
which rule of CodePro do this.
PMD has a rule for similar problems that you described:
AvoidDuplicateLiterals - Code containing duplicate String literals can usually be improved by declaring the String as a constant field.