@@ -42,28 +42,31 @@ protected function configure()
4242 ->setName ('metrics ' )
4343 ->setDescription ('Run analysis ' )
4444 ->addArgument (
45- 'path ' , InputArgument::REQUIRED , 'Path to explore '
45+ 'path ' , InputArgument::REQUIRED , 'Path to explore '
4646 )
4747 ->addOption (
48- 'report-html ' ,null , InputOption::VALUE_REQUIRED , 'Path to save report in HTML format. Example: /tmp/report.html '
48+ 'report-html ' ,null , InputOption::VALUE_REQUIRED , 'Path to save report in HTML format. Example: /tmp/report.html '
4949 )
5050 ->addOption (
51- 'report-xml ' , null , InputOption::VALUE_REQUIRED , 'Path to save summary report in XML format. Example: /tmp/report.xml '
51+ 'report-xml ' , null , InputOption::VALUE_REQUIRED , 'Path to save summary report in XML format. Example: /tmp/report.xml '
5252 )
5353 ->addOption (
5454 'violations-xml ' , null , InputOption::VALUE_REQUIRED , 'Path to save violations in XML format. Example: /tmp/report.xml '
5555 )
5656 ->addOption (
57- 'report-csv ' , null , InputOption::VALUE_REQUIRED , 'Path to save summary report in CSV format. Example: /tmp/report.csv '
57+ 'report-csv ' , null , InputOption::VALUE_REQUIRED , 'Path to save summary report in CSV format. Example: /tmp/report.csv '
5858 )
5959 ->addOption (
60- 'level ' , null , InputOption::VALUE_REQUIRED , 'Depth of summary report ' , 0
60+ 'level ' , null , InputOption::VALUE_REQUIRED , 'Depth of summary report ' , 0
6161 )
6262 ->addOption (
63- 'extensions ' , null , InputOption::VALUE_REQUIRED , 'Regex of extensions to include ' , 'php '
63+ 'extensions ' , null , InputOption::VALUE_REQUIRED , 'Regex of extensions to include ' , 'php '
6464 )
6565 ->addOption (
66- 'without-oop ' , null , InputOption::VALUE_NONE , 'If provided, tool will not extract any informations about OOP model (faster) '
66+ 'excludedDirs ' , null , InputOption::VALUE_REQUIRED , 'Regex of subdirectories to exclude ' , 'Tests|Features '
67+ )
68+ ->addOption (
69+ 'without-oop ' , null , InputOption::VALUE_NONE , 'If provided, tool will not extract any informations about OOP model (faster) '
6770 )
6871 ;
6972 }
@@ -80,7 +83,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
8083 $ level = $ input ->getOption ('level ' );
8184
8285 // files
83- $ finder = new Finder ($ input ->getOption ('extensions ' ));
86+ $ finder = new Finder (
87+ $ input ->getOption ('extensions ' ),
88+ $ input ->getOption ('excludedDirs ' )
89+ );
8490
8591 // rules
8692 $ rules = new \Hal \Application \Rule \RuleSet ();
0 commit comments