Vscode-intelephense: Add finer control over which undefined symbol diagnostics should be enabled

Created on 5 Dec 2019  路  7Comments  路  Source: bmewburn/vscode-intelephense

eg undefined types, functions, constants, members, variables.

Most helpful comment

New settings added in 1.3.3:
intelephense.diagnostics.undefinedTypes
intelephense.diagnostics.undefinedFunctions
intelephense.diagnostics.undefinedConstants
intelephense.diagnostics.undefinedClassConstants
intelephense.diagnostics.undefinedMethods
intelephense.diagnostics.undefinedProperties
intelephense.diagnostics.undefinedVariables

1.2 only had undefined variable diagnostics. Disabled all the others will give 1.2 behaviour.

All 7 comments

Yes this would be ideal, if nothing else can be done, because for example anyone working in WordPress theme development and only have their theme folder as their project, _every single WP function_ shows up as undefined.

It is a bit unfortunate however to have to turn off checking for undefined symbols when really they aren't undefined technically. :)

Annotation 2019-12-06 100802

@onetrev I'll ship some wp stubs in a future release #833

Is there a workaround for this currently? Just updated and realized this is an issue...

https://github.com/bmewburn/intelephense-docs/issues/2

This fixes most problems but doesn't seem to include core constants.

@wkoehn the wordpress stubs package author may accept a request for this or a PR.

@bmewburn Thanks, I'll look into it a bit deeper. For now, I just included WP core in my workspace folders and it has no problems parsing that. I'd prefer an updated stubs package of course but this gets me going for now. I love the extension and just purchased pro!

New settings added in 1.3.3:
intelephense.diagnostics.undefinedTypes
intelephense.diagnostics.undefinedFunctions
intelephense.diagnostics.undefinedConstants
intelephense.diagnostics.undefinedClassConstants
intelephense.diagnostics.undefinedMethods
intelephense.diagnostics.undefinedProperties
intelephense.diagnostics.undefinedVariables

1.2 only had undefined variable diagnostics. Disabled all the others will give 1.2 behaviour.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zlianon picture zlianon  路  3Comments

usrnm-nk picture usrnm-nk  路  3Comments

aleksandervines picture aleksandervines  路  3Comments

nn-hh picture nn-hh  路  3Comments

superadmini picture superadmini  路  4Comments