Code Monkey home page Code Monkey logo

Comments (10)

fonsecas72 avatar fonsecas72 commented on August 20, 2024

Or maybe phpcsmd could just change its logic and instead of "ignore this extensions/files" it could be "check this extensions/files" and have php - js and css files by default. (?)

from phpcsmd.

vralfy avatar vralfy commented on August 20, 2024

What about supporting both? Let the user decide if he/she wants to ignore or include specific regex

from phpcsmd.

fonsecas72 avatar fonsecas72 commented on August 20, 2024

supporting both seams good, but how do you plan to do that?
making up that regex that I've made may be too difficult for a user not familiar to regex language.
also, is it possible that someone wants to validate a pdf file? because wright now that's the default behavior when you check a whole dir.

from phpcsmd.

fonsecas72 avatar fonsecas72 commented on August 20, 2024

Ok, this works.
It would be better for me as a user if I just put "php,css,js" or "java,txt,png,jpg,gif" instead of editing a regex but for now this is enough.
You may close this issue or save it for later improvements ;)

from phpcsmd.

fonsecas72 avatar fonsecas72 commented on August 20, 2024

Oh, this is missing from project properties!

from phpcsmd.

vralfy avatar vralfy commented on August 20, 2024

That's why i didn't closed it :D

from phpcsmd.

fonsecas72 avatar fonsecas72 commented on August 20, 2024

In eclipse we could use patterns to ignore files or folders. We could just do:
"/folder/,file.js,/anotherfolder/,anotherfile.php"
And this whole folders and files are ignored.
I don't know if it is possible/easy enough to apply this logic here but maybe in the eclipse plugin we can learn something ;)
https://github.com/PHPsrc/org.phpsrc.eclipse.pti.tool.codesniffer/blob/master/src/org/phpsrc/eclipse/pti/tools/codesniffer/core/PHPCodeSniffer.java

https://github.com/PHPsrc/org.phpsrc.eclipse.pti.tool.codesniffer

from phpcsmd.

vralfy avatar vralfy commented on August 20, 2024

Could you test if this works for you?

from phpcsmd.

fonsecas72 avatar fonsecas72 commented on August 20, 2024

I don't think so...I've try to ignore (by using both ways) php files and they are beeing scanned even after netbeans restart.
This are the settings being save (don't know if that helps :p)

phpcsmd.phpcs.standard=/var/www/project/build/CS
phpcsmd.general.ignorepattern=\\.(svn|git)|\\.(phtml|html|xml|txt|java|svg|png|jpg|gif|php)$
phpcsmd.general.includepattern=(?\!.*\\.(svn|git))(\\.(css|js|php3|php4|php5))$
phpcsmd.general.includestrategy=false

from phpcsmd.

vralfy avatar vralfy commented on August 20, 2024

Tested several times. Works for me now.

from phpcsmd.

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.