hhatto / gocloc

A little fast cloc(Count Lines Of Code)
MIT License
792 stars 79 forks source link

Is it possible to not match multiple directories --not-match-d #11

Closed kteb closed 6 years ago

kteb commented 6 years ago

Hello, it's a nice project, I wanted to know if there was a way to exclude more than one folder ?

If yes, how ? If no, will it be a big change to implement ?

rpalmer245 commented 6 years ago

To match multiple directories, use regular expressions. So you would separate directory names with a pipe character: |

Depending on your shell, you may need to escape the pipe character with a backslash.

Example: gocloc . --not-match-d=vendor\|.docker This would exclude .docker/ and vendor/ directories from gocloc's results.

kteb commented 6 years ago

It worked thanks