Skip to content

Commit

Permalink
Release 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed Aug 14, 2018
1 parent 583f8a2 commit adb1322
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ USAGE:
scc DIRECTORY
VERSION:
1.6.0
1.7.0
COMMANDS:
help, h Shows a list of commands or help for one command
Expand All @@ -85,6 +85,7 @@ GLOBAL OPTIONS:
--averagewage value, --aw value Set as integer to set the average wage used for basic COCOMO calculation (default: 56286)
--cocomo, --co Set to check remove COCOMO calculation output
--filegccount value, --fgc value How many files to parse before turning the GC on (default: 10000)
--binary Set to disable binary file detection
--debug Set to enable debug output
--trace Set to enable trace output, not recommended for multiple files
--help, -h show help
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func main() {
app := cli.NewApp()
app.EnableBashCompletion = true
app.Name = "scc"
app.Version = "1.6.0"
app.Version = "1.7.0"
app.Usage = "Sloc, Cloc and Code. Count lines of code in a directory with complexity estimation."
app.UsageText = "scc DIRECTORY"

Expand Down
4 changes: 3 additions & 1 deletion processor/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func walkDirectoryParallel(root string, output *chan *FileJob) {
all, _ := ioutil.ReadDir(root)
// TODO the gitignore should check for futher gitignores deeper in the tree
gitignore, gitignoreerror := gitignore.NewGitIgnore(filepath.Join(root, ".gitignore"))
resetGc := false

for _, f := range all {
// Godirwalk despite being faster than the default walk is still too slow to feed the
Expand Down Expand Up @@ -104,8 +105,9 @@ func walkDirectoryParallel(root string, output *chan *FileJob) {
mutex.Unlock()

// Turn GC back to what it was before if we have parsed enough files
if totalCount >= GcFileCount {
if !resetGc && totalCount >= GcFileCount {
debug.SetGCPercent(gcPercent)
resetGc = true
}
wg.Done()
}(filepath.Join(root, f.Name()))
Expand Down

0 comments on commit adb1322

Please sign in to comment.