Skip to content

Commit 6c3cf0d

Browse files
committed
Resolve issue 457
1 parent fcda3f8 commit 6c3cf0d

File tree

3 files changed

+40
-19
lines changed

3 files changed

+40
-19
lines changed

SCC-OUTPUT-REPORT.html

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
<tbody><tr>
1414
<th>Go</th>
1515
<th>30</th>
16-
<th>9384</th>
17-
<th>1462</th>
16+
<th>9395</th>
17+
<th>1463</th>
1818
<th>454</th>
19-
<th>7468</th>
20-
<th>1520</th>
21-
<th>403311</th>
22-
<th>3958</th>
19+
<th>7478</th>
20+
<th>1524</th>
21+
<th>403651</th>
22+
<th>3963</th>
2323
</tr><tr>
2424
<td>processor/workers_test.go</td>
2525
<td></td>
@@ -63,13 +63,13 @@
6363
</tr><tr>
6464
<td>processor/processor.go</td>
6565
<td></td>
66-
<td>644</td>
67-
<td>137</td>
66+
<td>655</td>
67+
<td>138</td>
6868
<td>101</td>
69-
<td>406</td>
70-
<td>87</td>
71-
<td>18618</td>
72-
<td>421</td>
69+
<td>416</td>
70+
<td>91</td>
71+
<td>18958</td>
72+
<td>427</td>
7373
</tr><tr>
7474
<td>processor/detector_test.go</td>
7575
<td></td>
@@ -324,15 +324,15 @@
324324
<tfoot><tr>
325325
<th>Total</th>
326326
<th>30</th>
327-
<th>9384</th>
328-
<th>1462</th>
327+
<th>9395</th>
328+
<th>1463</th>
329329
<th>454</th>
330-
<th>7468</th>
331-
<th>1520</th>
332-
<th>403311</th>
333-
<th>3958</th>
330+
<th>7478</th>
331+
<th>1524</th>
332+
<th>403651</th>
333+
<th>3963</th>
334334
</tr>
335335
<tr>
336-
<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>
336+
<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>
337337
</tr></tfoot>
338338
</table></body></html>

processor/processor.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"fmt"
88
"os"
99
"path/filepath"
10+
"regexp"
1011
"runtime"
1112
"runtime/debug"
1213
"sort"
@@ -596,6 +597,16 @@ func Process() {
596597
fileWalker.IncludeHidden = true
597598
fileWalker.ExcludeDirectory = PathDenyList
598599

600+
for _, exclude := range Exclude {
601+
regexpResult, err := regexp.Compile(exclude)
602+
if err == nil {
603+
fileWalker.ExcludeFilenameRegex = append(fileWalker.ExcludeFilenameRegex, regexpResult)
604+
fileWalker.ExcludeDirectoryRegex = append(fileWalker.ExcludeDirectoryRegex, regexpResult)
605+
} else {
606+
printError(err.Error())
607+
}
608+
}
609+
599610
go func() {
600611
err := fileWalker.Start()
601612
if err != nil {

test-all.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,16 @@ else
885885
echo -e "${GREEN}PASSED exclude-ext check"
886886
fi
887887

888+
# Issue 457
889+
if ./scc -M ".*" | grep -q "0.000 megabytes"; then
890+
echo -e "${GREEN}PASSED issue 457"
891+
else
892+
echo -e "${RED}======================================================="
893+
echo -e "FAILED issue 457"
894+
echo -e "=======================================================${NC}"
895+
exit
896+
fi
897+
888898
# Try out specific languages
889899
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 '
890900
do

0 commit comments

Comments
 (0)