-
-
Notifications
You must be signed in to change notification settings - Fork 296
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Running scc with the --min
argument on my code base results in a divide by zero error
panic: runtime error: integer divide by zero
goroutine 36 [running]:
github.com/boyter/scc/processor.CountStats(0xc0020fbe00)
/Users/bb100123/Documents/kablamo/scc/processor/workers.go:578 +0x1547
github.com/boyter/scc/processor.processFile(0xc0020fbe00, 0xc0026026c0)
/Users/bb100123/Documents/kablamo/scc/processor/workers.go:731 +0x139
github.com/boyter/scc/processor.fileProcessorWorker.func1(0xc0000a0180, 0xc000200000, 0xc000200008, 0xc000200010, 0xc0000a01e0, 0xc000200020)
/Users/bb100123/Documents/kablamo/scc/processor/workers.go:660 +0x2f8
created by github.com/boyter/scc/processor.fileProcessorWorker
/Users/bb100123/Documents/kablamo/scc/processor/workers.go:631 +0x105
To Reproduce
Unfortunately I cant share the code thats causing this (2m+ lines of company code), hopefully you will get some clue by the stack trace.
I run scc --min
or scc --min-gen
. I tried some other options and they work as expected..
Expected behavior
No crash :)
Desktop (please complete the following information):
- OS: Windows
- Version: 2.13.0
ps. SCC is great, just found it the other day while looking for easy to install and fast alternative to cloc, thanks!
boyter and danadalleh
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working