Skip to content

Commit

Permalink
Force the script to allow unlimited memory usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
Juti Noppornpitak committed Nov 28, 2013
1 parent 2b36c4f commit 532b097
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions cuke
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env php
#!/usr/bin/env php -d memory_limit=-1
<?php
/**
* Cuke - Coding Standard Checker and Semantic Analyzer for Gherkin
Expand Down Expand Up @@ -80,6 +80,7 @@ function main($argumentList)
'html', // HTML
);

$startingTime = microtime(true);
$output = new Output();
$manager = new AnalyzerManager();
$cuke = new Core();
Expand Down Expand Up @@ -169,8 +170,11 @@ function main($argumentList)
$printer->doPrint($pathToFeedbackMap);

$output->writeln('Analysis complete.');
$output->writeln(PHP_EOL . 'Please note that this tool only detects classic errors.');
$output->writeln('Bye bye!');

$output->writeln(PHP_EOL . 'Please note that this tool only detects classic errors.' . PHP_EOL);

$output->writeln(sprintf('Peak memory usage in MB: %.2f', memory_get_peak_usage(true) / 1024 / 1024));
$output->writeln(sprintf('Time elapsed in seconds: %.2f ', microtime(true) - $startingTime));

if (count($pathToFeedbackMap) > 0) {
exit(1);
Expand Down
2 changes: 1 addition & 1 deletion cuke-standalone
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env php
#!/usr/bin/env php -d memory_limit=-1
<?php
/**
* Cuke - Coding Standard Checker and Semantic Analyzer for Gherkin
Expand Down

0 comments on commit 532b097

Please sign in to comment.