2

Hi I currently working on php coding sniffer. We are using the ruleset.xml file in PHPStorm as well on our TeamCity buildserver. This works fine.

The last thing we wanted todo is to exclude 3th party libraries. What is do know is that we should us the <exclude-pattern> tag for this and that we should escape the pattern differently for Linux and Windows.

What I do not understand is how to exclude a directory recursively. For example how do I exclude X,Y, Z and all the files in those directories?

 - Library
    - 3PartyStuff
      - X
      - Y
      - Z
    - Feeds
    - Products

It seems that putting the whole path into the exclude tag does not work for me.

  • Thank you, but I did already know that but we really want to use the ruleset.xml as one single entry point for developers and the build server. So there is one "truth". For example to exclude all files under Library\Providers we tried this and many more combinations without any success. *\Library\PaymentProviders\* */Library/PaymentProviders/* What am I missing here? – user3032676 Jan 16 '14 at 12:08

1 Answers1

1

On the command line, add the directories to the ignore:

--ignore=Library/3PartyStuff/X/*,Library/3PartyStuff/Y/*,Library/3PartyStuff/Z/*
Steven Scott
  • 10,234
  • 9
  • 69
  • 117