Closed vipul-bhardwaj closed 4 years ago
`package com.exxeta.iss.sonar.esql.check;
import org.sonar.check.Rule;
import com.exxeta.iss.sonar.esql.api.tree.statement.DeclareStatementTree; import com.exxeta.iss.sonar.esql.api.visitors.DoubleDispatchVisitorCheck;
@Rule(key="BlobVariableName") public class BlobVariableNameCheck extends DoubleDispatchVisitorCheck{
@Override
public void visitDeclareStatement(DeclareStatementTree tree){
if(tree.dataType().dataType().text().toUpperCase().equals("BLOB")) {
for(int i=0;i<tree.nameList().size();i++) {
if(!tree.nameList().get(i).name().startsWith("blob")) {
addIssue(tree,"Blob Variable Name: "+tree.nameList().get(i).name()+" must start with blob");
}
}
}
}
}`
Hi @vipul-bhardwaj , can you provide the esql file or the relevant part of it? Then it should be easy to fix this issue.
Is BlobVariableNameCheck a rule you defined somewhere else? I think it's not part of the current codebase.
Hi Thomas,
This issue is resolved now. Thanks for the concern.