[FEATURE] Enhance the Linter to include Code Snippets
Is your feature request related to a problem? Please describe.
The linter does not currently leverage the Code Snippets file, client\Syntaxes\snippets.json, to provide suggestions/enforce expected coding practices.
Describe the solution you'd like Take, for instance, the snippet for a FOR loop:
"FOR Loop": {
"prefix": "FOR",
"body": [
"FOR $1 = $2 To $3",
"$4",
"NEXT $1",
"$5"
],
"description": "Standard FOR Loop"
The Linter should analyze for loops to ensure they adhere to this structure and if they are found to deviate, note them appropriately to the user within the Problems channel.
FWIW @GrantHart is currently in progress on this so assigning to him.
It sounds to me like you're saying a snippet should be used as a guide so that the linter regards the snippet as a rule for checking app code conformity. Change the snippet and there's no need to create a separate rule for linting.
Is that accurate? Is there an example of this for any other language?
That would be cool to use as a model - but I'm doubtful that we'll find this. From what I've seen, snippets are coded as provided in the OP, and linters rules are written as completely separate, hand-crafted TypeScript.
If you're just talking about improved, coded linting rules, then absolutely, yes - but that would be unrelated to snippets so maybe this ticket should be redefined?
Honestly @GrantHart is in progress on it which is why the ticket was memorialized. He's got the inside track on it. You have the short of it right though, that his idea and model would have the snippet dynamically impact the linter.