Skip to content

PHPCodesniffer errors in Atom #104

Open

Description

@jdelia

Not sure why, but I am receiving these errors only on Utility Pro project in Atom. Other projects I have set up are okay.

https://cl.ly/221C1c0P3o2n

Any ideas @GaryJones ?

Activity

  1. GaryJones commented on May 29, 2017

    @GaryJones
    Collaborator

    This section is only supported in WPCS 0.12.0. The latest release is 0.11.0, but I run the develop branch of WPCS, so don't get any errors. Chances are, 0.12.0 should be out before UP 2, but if not, we can delete that section before release.

    See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties#naming-conventions-prefix-everything-in-the-global-namespace

  2. jdelia commented on May 29, 2017

    @jdelia
    CollaboratorAuthor

    Thanks @GaryJones

  3. jdelia commented on May 29, 2017

    @jdelia
    CollaboratorAuthor

    @GaryJones what version of PHP_CodeSniffer are you running?

  4. GaryJones commented on May 29, 2017

    @GaryJones
    Collaborator

    2.9.0

  5. jdelia commented on May 29, 2017

    @jdelia
    CollaboratorAuthor

    I am on 2.9.1 and after updating to WPCS 0.12.0 - this is the only error I receive:

    Error running PHPCS Error: PHP Fatal error: Uncaught Error: Call to undefined function did_action() in /Users/loneduchess/Local Sites/utility-pro-2/app/public/wp-content/themes/utility-pro/vendor/tgmpa/tgm-plugin-activation/class-tgm-plugin-activation.php:2109(…)

    https://cl.ly/220g3f3w2A0T

  6. GaryJones commented on May 29, 2017

    @GaryJones
    Collaborator

    @jdelia

    We're trying to fix that in TGMPA.

    Add the following to the top of it the TGMPA class file:

    // Exit if accessed directly.
    if ( ! defined( 'ABSPATH' ) ) {
    	return;
    }

    See https://github.com/TGMPA/TGM-Plugin-Activation/blob/9f63adeb10dcadd8733757e5c9c23e137cc8faff/class-tgm-plugin-activation.php#L35-L38 and TGMPA/TGM-Plugin-Activation#665

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions