Showing 1 of 3 files from the diff.
Other files ignored by Codecov

@@ -13,12 +13,14 @@
Loading
13 13
	"log"
14 14
	"os"
15 15
	"path/filepath"
16 +
	"strconv"
16 17
	"strings"
17 18
)
18 19
19 20
type CocaClocConfig struct {
20 21
	ByDirectory bool
21 22
	TopFile     bool
23 +
	TopSizes    int
22 24
}
23 25
24 26
var (
@@ -71,6 +73,23 @@
Loading
71 73
72 74
	cloc_app.SortLangeByCode(languageSummaries)
73 75
76 +
	if len(languageSummaries) <= 3 {
77 +
		for _, summary := range languageSummaries {
78 +
			fmt.Fprintln(output, "Language: " + summary.Name)
79 +
			table := cmd_util.NewOutput(output)
80 +
			table.SetHeader([]string{"Length", "File", "Complexity", "WeightedComplexity"})
81 +
			sizes := len(summary.Files)
82 +
			if sizes >= clocConfig.TopSizes {
83 +
				sizes = clocConfig.TopSizes
84 +
			}
85 +
86 +
			for _, file := range summary.Files[:sizes] {
87 +
				table.Append([]string{strconv.Itoa(int(file.Code)), file.Language, strconv.Itoa(int(file.Complexity)),strconv.Itoa(int(file.WeightedComplexity)) })
88 +
			}
89 +
			table.Render()
90 +
		}
91 +
	}
92 +
74 93
	sortContent, _ := json.MarshalIndent(languageSummaries, "", "\t")
75 94
	cmd_util.WriteToCocaFile("sort_cloc.json", string(sortContent))
76 95
}
@@ -155,6 +174,7 @@
Loading
155 174
156 175
	flags.BoolVar(&clocConfig.ByDirectory, "by-directory", false, "list directory and out csv")
157 176
	flags.BoolVar(&clocConfig.TopFile, "top-file", false, "list top change file")
177 +
	flags.IntVar(&clocConfig.TopSizes, "top-size", 30, "top file sizes")
158 178
159 179
	flags.Int64Var(&processor.AverageWage, "avg-wage", 56286, "average wage value used for basic COCOMO calculation")
160 180
	flags.BoolVar(&processor.DisableCheckBinary, "binary", false, "disable binary file detection")
Files Coverage
cmd 85.08%
pkg 90.40%
coca.go 0.00%
Project Totals (113 files) 89.58%
730.6
1.14.x=.14.x
TRAVIS_OS_NAME=windows
730.5
1.13.x=.13.x
TRAVIS_OS_NAME=windows
1
ignore:
2
 - "languages"
3
 - "bughunt"
4
 - "cocatest"
5
 - "analysis"
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading