Skip to content

Report undefined/unused variables only inside functions #125

@ghnp5

Description

@ghnp5

Is it possible, or could it be possible in the future, to disable undefined/unused checks against variables outside functions?

I get a lot of false positives on files where variables are defined under "required/included" files, or in files that are themselves "required/included" by other files.

However, inside functions, it is much easier/accurate to find undefined/unused variables, and those are the places I'm particularly interested anyway.

This is what PHP Intelephense extension in VSCode does.
I just would like to do the same on the builds, using PHPCS.

Thank you very much.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions