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

missing semicolon (";") detection improvement #233

Open
ThomasBarberot opened this issue Jul 31, 2023 · 2 comments
Open

missing semicolon (";") detection improvement #233

ThomasBarberot opened this issue Jul 31, 2023 · 2 comments
Labels

Comments

@ThomasBarberot
Copy link

Hello.

Feature request description
I help some new RPG developers using VSCode/Code for i. And the most encoureted error is a missing semicolon (" ; ") at the end of an instruction, especially at the declaration level (dcl-s and dcl-ds).

And sometimes, I don't see it quickly and spend a lot of time to seek something else.

RDi comparison
In VSCode, when I remove an ending semicolon in a DS declaration (or after a calculation intruction), it appears this way:
CodeForI
As you can see, there is no warning to indicate that the second DS cannot be resolved because of the missing semicolon.

In RDi, the same member appears this way:
RDi
As you can see, on the line following the one where the semicolon is missing, there is a red cross to indicate the parsing issue.

Describe the solution you'd like
It would be great to indicate on the following line that the semicolon is missing, with a message or underlines like other errors.

Describe alternatives you've considered
I didnt't found anywhere to set on something to help to set focus on an error like missing semicolon. Perhaps I missed something.

Thanks for your great job around Code for i!

@worksofliam worksofliam transferred this issue from codefori/vscode-ibmi Jul 31, 2023
@worksofliam
Copy link
Contributor

If you add a lint configuration file with valid indentation, you will get a bunch of warnings :) I will see about how we can add this.

@ThomasBarberot
Copy link
Author

I tried to apply your advice (I spent some time trying to find out how to activate the linter! I tried it a few months ago!).
And this is what I see with the linter solution (with the indentation):

If I remove the semicolon at the end of a calculation line, no warning appears:
VSC_c

If I remove the semicolon at the end of a calculation line and the second DS, no warning appears:
VSC_d02

If I remove the semicolon at the end of a calculation line and the second DS and the first DS, warning appears:
VSC_d01

So the solution is working, but not completely because all the cases of missing semicolon are not covered.

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

No branches or pull requests

2 participants