Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable parse ESQL file with wrong comment sequence code #83

Open
t603 opened this issue Mar 9, 2018 · 6 comments
Open

Unable parse ESQL file with wrong comment sequence code #83

t603 opened this issue Mar 9, 2018 · 6 comments

Comments

@t603
Copy link

t603 commented Mar 9, 2018

Hello,

I have found another problem when parsing ESQL file. The code is:

CREATE COMPUTE MODULE Test
	CREATE FUNCTION Main() RETURNS BOOLEAN
	BEGIN
		/* OK comment */
		*/
		/* /* */ */
		RETURN TRUE;
	END;
END MODULE;

But in this case I know, that it is not correct ESQL code. I do not know, if ESQL plugin should analyze it too or not. I would understand, that such errors could be up to developer to correct is, the same like non-well-formed MSGFLOW.

And the reported error is:

ERROR: Unable to parse file: file:///C:/temp/temp/error05/Test.esql
ERROR: Parse error at line 5 column 3:

 1: CREATE COMPUTE MODULE Test
 2:  CREATE FUNCTION Main() RETURNS BOOLEAN
 3:  BEGIN
 4:   /* OK comment */
 5:   */
      ^
 6:   /* /* */ */
 7:   RETURN TRUE;
 8:  END;
 9: END MODULE;
10:

INFO: 1/1 source files have been analyzed

Regards, Stepan

@ThomasPohl
Copy link
Member

Hi Stepan,

the plugin can only parse wellformed esql code. Usually everything that produces syntax errors in IIB or the Integration toolkit results in parsing errors in the esql plugin. So for me that's just the expected behavior.

Would you expect something different?

Thomas

@t603
Copy link
Author

t603 commented Mar 9, 2018

Hi, Thomas,

yes, I agree with You, that parsing of non-well-formed (or zero length - another problem) ESQL or MSGFLOW does not make a sense. I wrote it already above,

But I would like (expect?) to have some text or database or ... log, where I can see the list of non-well-formed files and reason (error), so I would like to correct these errors. Does something like that exist? Because common shell, where are redirected stdout from SolarCube, is limited to the (more or less) number of lines, which in case of thousand files to be analysed, is not sufficient.

Stepan

@EddyVos
Copy link

EddyVos commented Mar 9, 2018

Hi @t603 ,

I did not test it yet but in IIB 10 you can install SonarLint using the Marketplace.
I'm not sure if it supports the latest Sonar versions but you could give it a try to use the Exetta JAR in this SonarLint within your toolkit.

The toolkit would also already give you warnings for misformed spelling together with the issues that are configured in the Exetta plugin.

https://www.sonarlint.org/eclipse/

Or is this not what you are searching for?

Eddy

@ThomasPohl
Copy link
Member

If we'll get SonarLint working, that would be great, but I think Eddy is right, the eclipse version of the Integration Toolkit is probably too old. I created an github issue for SonarLint: #12

Nevertheless it would be very helpful if the plugin creates an issue for files that are not parse-able. I will check if I find a way.

@ThomasPohl
Copy link
Member

I just noticed, that there are already issues for parsing errors, but they do not contain any further information:
image

@t603
Copy link
Author

t603 commented Mar 9, 2018

Hi, @EddyVos,

The toolkit would also already give you warnings for misformed spelling

You are right, the Toolkit report such errors. But in case You have +-3.000 ESQL files ;-) the Toolkit is hard to use for such a check. I have found EXXETA plugin few days ago and I run it on ESQL files backward.

Hi, @ThomasPohl,

if the plugin creates an issue for files that are not parse-able

Yes, such a log would be usefull, but it (and the whole non-well-formed topic) has not any high priority. Because (I guess), that non-well-formed ESQL or MSGFLOW files could not be compiled and deployed. So this is just a matter of automatic generated ESQL or MSGFLOW code or the code created outside the Toolkit, which both (auto-generated and edited by batch using find&replace) we have.

Regards, Stepan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants