EXXETA / sonar-esql-plugin

Sonar plugin to analyze ESQL-sourcecode of IBM Integration Bus projects
Apache License 2.0
35 stars 34 forks source link

Error while scanning Esql code #146

Closed tarekhammad1982 closed 1 year ago

tarekhammad1982 commented 1 year ago

Hi All,

I Am getting the following error when trying to scan Esql code

ERROR: Unable to analyse file: file:///C:/SourceCodeScan/esb-procure-to-pay-services-Develop@af9a8cdd2e8/InitiativeContractsInquiry/InitiativeContractsInquiry/InitiativeContractsInquiryRq.esql java.lang.IllegalArgumentException: Overlapping symbol declaration and reference for symbol at Range[from [line=48, lineOffset=35] to [line=48, lineOffset=44]] at org.sonar.api.utils.Preconditions.checkArgument(Preconditions.java:43) at org.sonar.api.batch.sensor.symbol.internal.DefaultSymbolTable$DefaultSymbol.newReference(DefaultSymbolTable.java:110) at org.sonar.api.batch.sensor.symbol.internal.DefaultSymbolTable$DefaultSymbol.newReference(DefaultSymbolTable.java:104) at com.exxeta.iss.sonar.esql.highlighter.HighlightSymbolTableBuilder.addReference(HighlightSymbolTableBuilder.java:58) at com.exxeta.iss.sonar.esql.highlighter.HighlightSymbolTableBuilder.highlightSymbol(HighlightSymbolTableBuilder.java:51) at com.exxeta.iss.sonar.esql.highlighter.HighlightSymbolTableBuilder.build(HighlightSymbolTableBuilder.java:39) at com.exxeta.iss.sonar.esql.EsqlSensor.highlightSymbols(EsqlSensor.java:328) at com.exxeta.iss.sonar.esql.EsqlSensor.scanFile(EsqlSensor.java:221)


while the line of code mentioned in the file is normal code for functions, which is CREATE FUNCTION DecryptPassword(IN Encrypted CHAR) RETURNS CHARACTER LANGUAGE JAVA EXTERNAL NAME "Password.decrypt";

image

christoph-weiss-ibm commented 1 year ago

Hi @tarekhammad1982: the same issue is already mentioned here: https://github.com/EXXETA/sonar-esql-plugin/issues/141 Unfortunately I am currently running into the same issue. Thus I asked in the other issue if there are any updates / information on the possible root cause.

ThomasPohl commented 1 year ago

I finally found the problem. I had saved the declaration twice (No clue why that was no problem in previous versions) Will be fixed in next release

ThomasPohl commented 1 year ago

@tarekhammad1982 @christoph-weiss-ibm Please check if release 3.4.0-RC2 fixes the problem for you