Giter VIP home page Giter VIP logo

Comments (1)

sirbrillig avatar sirbrillig commented on May 14, 2024

That's a good idea! Here's my notes from when I last set this up for VSCode, which may help you for right now, but a proper section of the README would be best.

Visit the extension page for VSCode phpcs and click "Install". Once it has installed, click "Reload" in the VSCode extension window or just reload the window by opening the command palette (command-P) and typing "reload".

Once the extension is installed, there are several ways to add the ruleset to a project. The simplest is probably to add a composer.json file to your project directory, then install following the instructions on the README:

composer require --dev dealerdirect/phpcodesniffer-composer-installer
composer require --dev sirbrillig/phpcs-variable-analysis

Next, create a file like this as a phpcs.xml file in your project directory:

<?xml version="1.0"?>
<ruleset name="MyStandard">
    <rule ref="VariableAnalysis"/>
</ruleset>

After that, it should just work!

from phpcs-variable-analysis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.