SSlinky / VBA-LanguageServer

VBA Language Server
GNU General Public License v3.0
16 stars 4 forks source link

[Feature] Can we have a workspace setting for not reporting `Option Explicit is missing from module header.`? #16

Open sancarn opened 3 months ago

sancarn commented 3 months ago

Is your feature request related to a problem? Please describe.

The problem is all my modules are highlighted yellow and I personally feel this isn't a warn-able offence 🤣

I frequently use the following for dependency injection:

if isObject(stdError) then
  Call stdError.Raise(...)
else
  Err.Raise ...
End if

And this requires Option Explicit to not be enabled.

Describe the solution you'd like

Making this feature toggle-able in the VSCode settings would be the ideal scenario in my mind, and personally I'd suggest default off.

SSlinky commented 3 months ago

Yes, I plan to make these warnings linked to options, but I respectfully disagree with the default being off. I haven't come across a scenario where omitting it was better practice than having it.