Skip to content

Commit

Permalink
Add constrain for max file size to prevent out of memory exception fr…
Browse files Browse the repository at this point in the history
…om CLOC
  • Loading branch information
cezarypiatek committed Nov 13, 2016
1 parent 2afce3a commit 9044cbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GenerateReport.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function Get-FilesLOC
$toExclude = $DirToExclude+$defaultIgnored
$excludeParam = "--exclude-dir=$($toExclude -join ',')"
Write-Verbose "Exclude $excludeParam"
& $clocExePath --by-file --csv --skip-uniqueness $excludeParam --out="$OutFilePath" (Get-Item $CheckoutDir).FullName | Write-Verbose
& $clocExePath --by-file --csv --skip-uniqueness $excludeParam --max-file-size=2 --out="$OutFilePath" (Get-Item $CheckoutDir).FullName | Write-Verbose
if(-not(Test-Path $OutFilePath))
{
$PSCmdlet.ThrowTerminatingError("Cannot create LOC statistics file")
Expand Down

0 comments on commit 9044cbe

Please sign in to comment.