vscode-rpgle icon indicating copy to clipboard operation
vscode-rpgle copied to clipboard

Rule removal `RequireBlankSpecial`

Open worksofliam opened this issue 2 years ago • 6 comments

*BLANK refers to a single space in RPGLE, not an empty string.

worksofliam avatar Sep 27 '22 16:09 worksofliam

Updated to extension 0.20.0, (happens in prior versions also), single character blanks in strings for SQL statement strings are highlighted. It might also happen with QCMDEXC command strings but I dont have an example of that appearing.

image

m-tyler avatar Aug 11 '23 16:08 m-tyler

Other examples where the rules should not mark code. image

m-tyler avatar Aug 11 '23 16:08 m-tyler

You cannot concat *BLANK to a string.

This code will not compile... image

This code compiles... image

I am in progress of writing a test member for all variations i can think of where ' ' might be present.

m-tyler avatar Aug 11 '23 16:08 m-tyler

@m-tyler solely screenshots are absolutely not helpful. Please just paste the content as well. Thanks!

0.20.0 was a big change under the hood so I was expecting new issues too.

worksofliam avatar Aug 11 '23 16:08 worksofliam

Screen shots were just to visualize the results.
The blank issue happens in the prior version at least, maybe in older ones as well. I was planning on putting in an issue of my own then I saw this sitting.

A source file I hope helps show where the rule causes me troubles. If I happen to use the Format Document (Shift+Alt+F) command to auto fix linter items, it fixes these then most of the marked lines will end up being incorrect.

ISSUE_132_RPGLE.RPGLE.txt

m-tyler avatar Aug 11 '23 17:08 m-tyler

Fix incoming this weekend!

Note: I am considering removing this rule entirely. It’s not used often.

worksofliam avatar Aug 11 '23 17:08 worksofliam