Git Product home page Git Product logo

Comments (7)

sunverwerth avatar sunverwerth commented on August 15, 2024 3

I've been using https://github.com/squizlabs/PHP_CodeSniffer at work.
It's extendable with custom validation rules and already contains rules for PSR-2.
It's available as a composer package and actively maintained.

Overall very nice, haven't integrated it with a CI solution, however.

And since #35 already depends on it this would be a good fit.

from php-language-server.

kaloyan-raev avatar kaloyan-raev commented on August 15, 2024

How about using the PHP Mess Detector for additional static code analysis?

from php-language-server.

felixfbecker avatar felixfbecker commented on August 15, 2024

What I desire is a linter, that can be configured through a config file and defaults to some coding best practices, that can be installed with Composer, run in CI and has an editor plugin for VS Code

If anyone has experience with one I would welcome a PR

from php-language-server.

kaloyan-raev avatar kaloyan-raev commented on August 15, 2024

As far as I am familiar there is no one tool to rule them all. http://phpqatools.org/ is a nice collection of popular tools that are used in CI. Some of them like Code Sniffer and Mess Detector are also often integrated in the editor/IDE.

I can imagine that the language server look for the specific configuration files in the project and if found, activate the corresponding linting tool. For example, if there is a phpcs.xml file then the language server will activate use Code Sniffer to report additional diagnostics. Of course, the client should be able to override this default behavior.

from php-language-server.

felixfbecker avatar felixfbecker commented on August 15, 2024

@kaloyan-raev This issue is not for adding linting to the LS, it is for linting this repository (for PRs etc) 😄

from php-language-server.

kaloyan-raev avatar kaloyan-raev commented on August 15, 2024

OK :)

from php-language-server.

ADmad avatar ADmad commented on August 15, 2024

..and has an editor plugin for VS Code

This phpcs plugin works just fine https://marketplace.visualstudio.com/items?itemName=ikappas.phpcs

from php-language-server.

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.