GithubHelp home page GithubHelp logo

Comments (3)

jonsugar avatar jonsugar commented on May 18, 2024

PHPCS working in PHPStorm using Tighten's config from the vendor directory.

image

And now how to configure it…

Enable PHPCS

  1. Open composer.json and click the settings cog next to the phpcodesniffer dependency.

image

  1. Fill in the path to phpcs and phpcbf.

image

Configure the CodeSniffer Inspection

  1. Go to Settings > Editor > Inspections
  2. Open the PHP > Quality Tools > PHP_CodeSniffer validation inspection.
  3. Set Coding standard to custom.
  4. Click the … to the right of custom .

image

  1. add the path to the .phpcs.xml.dist within the vendor directory.

image

from duster.

mattstauffer avatar mattstauffer commented on May 18, 2024

Thanks! I'm starting to think the only good way to handle this in all editors is to either A) publish the configs to the root directory by default or B) symlink them to the root by default, even with that clever PHPStorm fix you have there.

One idea is to have Duster publish a PHPCS standard and then "publish" would just output a local file that applies that standard to all of your local directories, so we can still iterate on the PHPCS standard.

I dropped PHP-CS-Fixer and Duster's Tlint config is just Tighten's, so that doesn't need to be published at all.

I think I'm leaning in that direction right now.

from duster.

mattstauffer avatar mattstauffer commented on May 18, 2024

OK, latest release publishes .phpcs.xml.dist by default, so I think this is solved.

from duster.

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.