Closed sudhiraroraCVS closed 12 months ago
I believe the linting rules are harcoded but can be switched on or off with configuration.
I'm sure PRs would be accepted for new ones.
Out of interest is a SETLL and a READE genuinely faster than a keyed CHAIN?
I know it's faster to prove the existence of a record i.e. because you can use %FOUND on a SETLL without reading the fields into memory. However I wasn't aware of a performance difference otherwise.
How would you check this programmatically? Do you not allow any CHAIN operations in your programs at all?
Linter requests can ba added as an issue here: https://github.com/codefori/vscode-rpgle
Yeah that's for the same purpose you mentioned %Found with Setll instead of using CHAIN. I couldn't understand on your answer for new linting rules, it can be added ? what does PRs mean ?
PR = Pull request i.e. you do the code in your own fork then submit to the main branch for review. Its not necessary, but obviously its the quickest way to get a feature into the plugin (assuming that it's accepted.)
Otherwise like I said if you have suggestions for Linting Rules you can submit them here : https://github.com/codefori/vscode-rpgle
You should submit each rule which you want individually
Do we have a sample code for existing linting rules and where exactly it's coded currently ?
2 questions :
Hi @sudhiraroraCVS !
Thanks for the detailed response. There is a mention of creating our own extension and then we can add our rules. Can you share the steps to create our own extension or in case you have any reference then that would be great.
@sudhiraroraCVS See the guide here: https://code.visualstudio.com/api/get-started/your-first-extension
I am going to close this issue now. Thanks.
Hi Team,
I work in CVS Health and was exploring Linting feature of RPGLE on VS Code for our discovery project on VS Code. Linting is a really good feature which is not available in RDI and we know RPGLINT.JSON file can some pre-defined linting parameters to enforce the rules but we want to use this feature to next level if there is way to add/configure our own rules for linting so that we can better use this feature of VS Code. Our Use case is : We have Dev code check list with a long list which our developers performs manual check on the code and we want to automate that. I know we can user Sonarqube scans which are available for RPGLE but that is too late in the game when code goes through CI pipeline. We want to enforce/configure our own rules during coding time so that we can force developers to fix the code early in the game.
We have huge list of Dev code checklist but below is 1 example from that list which we may want to add in RPG linting. So we want to understand if we have flexibility to add rules like below in RPG linter or we are just restricted to use pre-defined rules only. Please suggest. Check list item : Has SETLL and READE been used instead of CHAIN for performance.?
Thanks Sudhir.