Skip to content

Commit

Permalink
Add in gitmodule support and prepare 3.4.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed Sep 29, 2024
1 parent 7f8d760 commit 2b0d425
Show file tree
Hide file tree
Showing 14 changed files with 153 additions and 81 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ features listed below may be missing from your installation.

```
Sloc, Cloc and Code. Count lines of code in a directory with complexity estimation.
Version 3.3.4
Version 3.4.0
Ben Boyter <ben@boyter.org> + Contributors
Usage:
Expand Down Expand Up @@ -260,6 +260,8 @@ Flags:
-d, --no-duplicates remove duplicate files from stats and output
--no-gen ignore generated files in output (implies --gen)
--no-gitignore disables .gitignore file logic
--no-gitmodule disables .gitmodules file logic
--no-hborder remove horizontal borders between sections
--no-ignore disables .ignore file logic
--no-large ignore files over certain byte and line size set by max-line-count and max-byte-count
--no-min ignore minified files in output (implies --min)
Expand Down
66 changes: 33 additions & 33 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>9627</th>
<th>1481</th>
<th>468</th>
<th>7678</th>
<th>9637</th>
<th>1482</th>
<th>469</th>
<th>7686</th>
<th>1536</th>
<th>256617</th>
<th>4092</th>
<th>256846</th>
<th>4098</th>
</tr><tr>
<td>processor/formatters.go</td>
<td></td>
Expand Down Expand Up @@ -63,23 +63,23 @@
</tr><tr>
<td>processor/processor.go</td>
<td></td>
<td>667</td>
<td>140</td>
<td>103</td>
<td>424</td>
<td>671</td>
<td>141</td>
<td>104</td>
<td>426</td>
<td>92</td>
<td>19295</td>
<td>435</td>
<td>19411</td>
<td>438</td>
</tr><tr>
<td>main.go</td>
<td></td>
<td>398</td>
<td>404</td>
<td>10</td>
<td>6</td>
<td>382</td>
<td>388</td>
<td>10</td>
<td>8856</td>
<td>253</td>
<td>8969</td>
<td>256</td>
</tr><tr>
<td>processor/detector_test.go</td>
<td></td>
Expand Down Expand Up @@ -250,16 +250,6 @@
<td>0</td>
<td>2209</td>
<td>35</td>
</tr><tr>
<td>processor/cocomo_test.go</td>
<td></td>
<td>37</td>
<td>8</td>
<td>4</td>
<td>25</td>
<td>6</td>
<td>686</td>
<td>23</td>
</tr><tr>
<td>processor/bloom.go</td>
<td></td>
Expand All @@ -270,6 +260,16 @@
<td>2</td>
<td>1062</td>
<td>29</td>
</tr><tr>
<td>processor/cocomo_test.go</td>
<td></td>
<td>37</td>
<td>8</td>
<td>4</td>
<td>25</td>
<td>6</td>
<td>686</td>
<td>23</td>
</tr><tr>
<td>processor/helpers_test.go</td>
<td></td>
Expand Down Expand Up @@ -324,15 +324,15 @@
<tfoot><tr>
<th>Total</th>
<th>30</th>
<th>9627</th>
<th>1481</th>
<th>468</th>
<th>7678</th>
<th>9637</th>
<th>1482</th>
<th>469</th>
<th>7686</th>
<th>1536</th>
<th>256617</th>
<th>4092</th>
<th>256846</th>
<th>4098</th>
</tr>
<tr>
<th colspan="9">Estimated Cost to Develop (organic) $229,670<br>Estimated Schedule Effort (organic) 7.86 months<br>Estimated People Required (organic) 2.59<br></th>
<th colspan="9">Estimated Cost to Develop (organic) $229,922<br>Estimated Schedule Effort (organic) 7.87 months<br>Estimated People Required (organic) 2.60<br></th>
</tr></tfoot>
</table></body></html>
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/boyter/scc/v3
go 1.22

require (
github.com/boyter/gocodewalker v1.3.3
github.com/boyter/gocodewalker v1.3.4
github.com/json-iterator/go v1.1.12
github.com/mattn/go-runewidth v0.0.15
github.com/rs/zerolog v1.30.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
github.com/boyter/gocodewalker v1.3.3 h1:yPSbWT1wGmPSC73jASY0GaJu4EDN3FROfwYUDQjTmuE=
github.com/boyter/gocodewalker v1.3.3/go.mod h1:hXG8xzR1uURS+99P5/3xh3uWHjaV2XfoMMmvPyhrCDg=
github.com/boyter/gocodewalker v1.3.4 h1:52rQJhVKwTLbbwJqAvDogbILLz8GIMO2b5oWR2ikhAM=
github.com/boyter/gocodewalker v1.3.4/go.mod h1:hXG8xzR1uURS+99P5/3xh3uWHjaV2XfoMMmvPyhrCDg=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ=
Expand Down
6 changes: 6 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ func main() {
false,
"disables .gitignore file logic",
)
flags.BoolVar(
&processor.GitModuleIgnore,
"no-gitmodule",
false,
"disables .gitmodules file logic",
)
flags.BoolVar(
&processor.CountIgnore,
"count-ignore",
Expand Down
6 changes: 5 additions & 1 deletion processor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
)

// Version indicates the version of the application
var Version = "3.4.0 (beta)"
var Version = "3.4.0"

// Flags set via the CLI which control how the output is displayed

Expand Down Expand Up @@ -99,6 +99,9 @@ var Ci = false
// GitIgnore disables .gitignore checks
var GitIgnore = false

// GitModuleIgnore disables .gitmodules checks
var GitModuleIgnore = false

// Ignore disables ignore file checks
var Ignore = false

Expand Down Expand Up @@ -606,6 +609,7 @@ func Process() {
})
fileWalker.IgnoreGitIgnore = GitIgnore
fileWalker.IgnoreIgnoreFile = Ignore
fileWalker.IgnoreGitModules = GitModuleIgnore
fileWalker.IncludeHidden = true
fileWalker.ExcludeDirectory = PathDenyList

Expand Down
2 changes: 1 addition & 1 deletion vendor/github.com/boyter/gocodewalker/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 0 additions & 24 deletions vendor/github.com/boyter/gocodewalker/UNLICENSE

This file was deleted.

2 changes: 1 addition & 1 deletion vendor/github.com/boyter/gocodewalker/check.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2b0d425

Please sign in to comment.