Skip to content

Commit

Permalink
Resolve issue 457
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed May 15, 2024
1 parent fcda3f8 commit 6c3cf0d
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 19 deletions.
38 changes: 19 additions & 19 deletions SCC-OUTPUT-REPORT.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
<tbody><tr>
<th>Go</th>
<th>30</th>
<th>9384</th>
<th>1462</th>
<th>9395</th>
<th>1463</th>
<th>454</th>
<th>7468</th>
<th>1520</th>
<th>403311</th>
<th>3958</th>
<th>7478</th>
<th>1524</th>
<th>403651</th>
<th>3963</th>
</tr><tr>
<td>processor/workers_test.go</td>
<td></td>
Expand Down Expand Up @@ -63,13 +63,13 @@
</tr><tr>
<td>processor/processor.go</td>
<td></td>
<td>644</td>
<td>137</td>
<td>655</td>
<td>138</td>
<td>101</td>
<td>406</td>
<td>87</td>
<td>18618</td>
<td>421</td>
<td>416</td>
<td>91</td>
<td>18958</td>
<td>427</td>
</tr><tr>
<td>processor/detector_test.go</td>
<td></td>
Expand Down Expand Up @@ -324,15 +324,15 @@
<tfoot><tr>
<th>Total</th>
<th>30</th>
<th>9384</th>
<th>1462</th>
<th>9395</th>
<th>1463</th>
<th>454</th>
<th>7468</th>
<th>1520</th>
<th>403311</th>
<th>3958</th>
<th>7478</th>
<th>1524</th>
<th>403651</th>
<th>3963</th>
</tr>
<tr>
<th colspan="9">Estimated Cost to Develop (organic) $223,079<br>Estimated Schedule Effort (organic) 7.78 months<br>Estimated People Required (organic) 2.55<br></th>
<th colspan="9">Estimated Cost to Develop (organic) $223,393<br>Estimated Schedule Effort (organic) 7.78 months<br>Estimated People Required (organic) 2.55<br></th>
</tr></tfoot>
</table></body></html>
11 changes: 11 additions & 0 deletions processor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"
"os"
"path/filepath"
"regexp"
"runtime"
"runtime/debug"
"sort"
Expand Down Expand Up @@ -596,6 +597,16 @@ func Process() {
fileWalker.IncludeHidden = true
fileWalker.ExcludeDirectory = PathDenyList

for _, exclude := range Exclude {
regexpResult, err := regexp.Compile(exclude)
if err == nil {
fileWalker.ExcludeFilenameRegex = append(fileWalker.ExcludeFilenameRegex, regexpResult)
fileWalker.ExcludeDirectoryRegex = append(fileWalker.ExcludeDirectoryRegex, regexpResult)
} else {
printError(err.Error())
}
}

go func() {
err := fileWalker.Start()
if err != nil {
Expand Down
10 changes: 10 additions & 0 deletions test-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,16 @@ else
echo -e "${GREEN}PASSED exclude-ext check"
fi

# Issue 457
if ./scc -M ".*" | grep -q "0.000 megabytes"; then
echo -e "${GREEN}PASSED issue 457"
else
echo -e "${RED}======================================================="
echo -e "FAILED issue 457"
echo -e "=======================================================${NC}"
exit
fi

# Try out specific languages
for i in 'Bosque ' 'Flow9 ' 'Bitbucket Pipeline ' 'Docker ignore ' 'Q# ' 'Futhark ' 'Alloy ' 'Wren ' 'Monkey C ' 'Alchemist ' 'Luna ' 'ignore ' 'XML Schema ' 'Web Services' 'Go ' 'Java ' 'Boo ' 'License ' 'BASH ' 'C Shell ' 'Korn Shell ' 'Makefile ' 'Shell ' 'Zsh ' 'Rakefile ' 'Gemfile ' 'Dockerfile ' 'Yarn ' 'Sieve ' 'F# ' 'Elm ' 'Terraform ' 'Clojure ' 'C# ' 'LLVM IR ' 'HAML ' 'FXML ' 'DM ' 'Nushell ' 'Racket ' 'DOT ' 'YAML ' 'Teal ' 'FSL ' 'INI ' 'Hare ' 'Templ ' 'Cuda ' 'GraphQL ' 'Bicep ' 'Pkl ' 'TypeSpec ' 'LALRPOP ' 'Snakemake ' 'OpenQASM ' 'Typst ' 'ZoKrates ' 'Chapel ' 'Slang ' 'Circom '
do
Expand Down

0 comments on commit 6c3cf0d

Please sign in to comment.