1,070 matches across 25 files for func main lang:Go
snippet_mode: grep · sorted by relevance
1▶package main
2
3import (
· · ·
38)
39
40▶func intPtr(i int) *int {
41 return &i
42}
· · ·
43
44▶func timePtr(t time.Duration) *time.Duration {
45 return &t
46}
· · ·
47
48▶func main() {
49 http.HandleFunc("/health-check/", func(w http.ResponseWriter, r *http.Request) {
50 locationLogMutex.Lock()
· · ·
49▶ http.HandleFunc("/health-check/", func(w http.ResponseWriter, r *http.Request) {
50 locationLogMutex.Lock()
51 for k, v := range locationTracker {
+ 20 more matches in this file
1▶package main
2
3import (
· · ·
7)
8
9▶func Test_resolveColor(t *testing.T) {
10 tests := []struct {
11 name string
· · ·
55
56 for _, tt := range tests {
57▶ t.Run(tt.name, func(t *testing.T) {
58 if got := resolveColor(tt.color); got != tt.want {
59 t.Errorf("resolveColor(%q) = %q, want %q", tt.color, got, tt.want)
· · ·
63}
64
65▶func Test_formatCount(t *testing.T) {
66 type args struct {
67 count float64
· · ·
123 }
124 for _, tt := range tests {
125▶ t.Run(tt.name, func(t *testing.T) {
126 if got := formatCount(tt.args.count); got != tt.want {
127 t.Errorf("formatCount() = %v, want %v", got, tt.want)
+ 4 more matches in this file
1// SPDX-License-Identifier: MIT
2
3▶package main
4
5import (
· · ·
22// the user-facing `completion` command. These must reach cobra with the genuine
23// argv, so config discovery is skipped for them.
24▶func isCompletionInvocation(args []string) bool {
25 if len(args) < 2 {
26 return false
· · ·
69// config file from injecting count targets. When true (@file) positional lines
70// are kept, preserving the existing @file behaviour.
71▶func parseConfigArgs(content string, allowPositional bool) []string {
72 var args []string
73
· · ·
116// quote-aware tokens, stripping an unquoted trailing '#' comment. Backslash is
117// a literal outside quotes.
118▶func tokenizeConfigLine(line string) []string {
119 var tokens []string
120 var sb strings.Builder
· · ·
122 inToken := false
123
124▶ flush := func() {
125 if inToken {
126 tokens = append(tokens, sb.String())
+ 30 more matches in this file
1// SPDX-License-Identifier: MIT
2
3▶package main
4
5import (
· · ·
22// runSCCDir runs the test binary as scc in the given working directory, with
23// optional extra environment entries (KEY=VALUE).
24▶func runSCCDir(t *testing.T, dir string, env []string, args ...string) (string, error) {
25 t.Helper()
26 bin, err := filepath.Abs(sccBinPath)
· · ·
38}
39
40▶func TestParseConfigArgs(t *testing.T) {
41 t.Parallel()
42 tests := []struct {
· · ·
129
130 for _, tc := range tests {
131▶ t.Run(tc.name, func(t *testing.T) {
132 got := parseConfigArgs(tc.content, tc.allowPositional)
133 if !slices.Equal(got, tc.want) {
· · ·
138}
139
140▶func TestPreScanConfig(t *testing.T) {
141 t.Parallel()
142 tests := []struct {
+ 44 more matches in this file
1// SPDX-License-Identifier: MIT
2
3▶package main
4
5import (
· · ·
15)
16
17▶func printShellCompletion(cmd *cobra.Command, command string) error {
18 switch command {
19 case "bash":
· · ·
30}
31
32▶func printFlagSuggestion(flagSet *pflag.FlagSet, unknownFlag string) {
33 flags := processor.GetMostSimilarFlags(flagSet, unknownFlag)
34 if len(flags) == 0 {
· · ·
48
49//go:generate go run scripts/include.go
50▶func main() {
51 // f, _ := os.Create("scc.pprof")
52 // pprof.StartCPUProfile(f)
· · ·
56 // the bare boolean form and the explicit --mcp=true form pflag accepts, so the
57 // server starts consistently however the flag is spelled.
58▶ if slices.ContainsFunc(os.Args[1:], func(a string) bool {
59 return a == "--mcp" || a == "--mcp=true"
60 }) {
+ 2 more matches in this file
1▶package main
2
3import (
· · ·
14)
15
16▶const sccTestFlag string = "-test.main"
17
18var sccBinPath = os.Args[0]
· · ·
19
20▶func TestMain(m *testing.M) {
21 idx := slices.Index(os.Args, sccTestFlag)
22 if idx != -1 {
· · ·
23 os.Args = slices.Delete(os.Args, idx, idx+1)
24▶ main()
25 return
26 }
· · ·
29}
30
31▶func runSCC(args ...string) (string, error) {
32 args = slices.Insert(args, 0, sccTestFlag)
33 cmd := exec.Command(sccBinPath, args...)
+ 44 more matches in this file
1// SPDX-License-Identifier: MIT
2
3▶package main
4
5import (
· · ·
24var mcpMu sync.Mutex
25
26▶func startMCPServer() {
27 mcpServer := server.NewMCPServer(
28 "scc",
· · ·
218}
219
220▶func mcpAnalyzeHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
221 args := request.GetArguments()
222
· · ·
430}
431
432▶func mcpHotspotsHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
433 args := request.GetArguments()
434
· · ·
487}
488
489▶func mcpCouplingHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
490 args := request.GetArguments()
491
+ 11 more matches in this file
1// SPDX-License-Identifier: MIT
2
3▶package main
4
5import (
· · ·
25// the floor and never surface — giving both the all-pairs and per-file views a
26// single, predictable coupling to assert on. Returns the repo path.
27▶func makeCouplingRepo(t *testing.T) string {
28 t.Helper()
29 dir := t.TempDir()
· · ·
74const nestedCognitiveSource = `package sample
75
76▶func deeplyNested(items []int) int {
77 total := 0
78 for _, v := range items {
· · ·
91// callAnalyze runs the MCP analyze handler against dir with the supplied args
92// and returns the decoded response.
93▶func callAnalyze(t *testing.T, dir string, args map[string]any) mcpAnalyzeResponse {
94 t.Helper()
95
· · ·
129}
130
131▶func writeNestedFixture(t *testing.T) string {
132 t.Helper()
133 dir := t.TempDir()
+ 10 more matches in this file
20// if nesting 3 -> +4
21// if nesting 4 -> +5 total 14
22▶const deepChain = "func main() {\n" +
23 " if a {\n" +
24 " if b {\n" +
· · ·
37// if nesting 1 -> +2
38// if nesting 2 -> +3 total 10
39▶const deNested = "func main() {\n" +
40 " if a {\n" +
41 " if b {\n" +
· · ·
51//
52// if if if if each nesting 1 -> +2 each total 8
53▶const flat = "func main() {\n" +
54 " if a {\n }\n" +
55 " if b {\n }\n" +
· · ·
61// three shapes, strictly decreasing cognitive as they flatten — while the flat
62// cyclomatic Complexity stays 4 throughout.
63▶func TestCognitiveDeepVsDeNestedVsFlat(t *testing.T) {
64 Cognitive = true
65 defer func() { Cognitive = false }()
· · ·
65▶ defer func() { Cognitive = false }()
66
67 deep := countCognitive(t, "Go", deepChain)
+ 7 more matches in this file
11)
12
13▶func TestGetExtension(t *testing.T) {
14 got := getExtension("something.c")
15 expected := "c"
· · ·
20}
21
22▶func TestGetExtensionNoExtension(t *testing.T) {
23 got := getExtension("something")
24 expected := "something"
· · ·
29}
30
31▶func TestGetExtensionMultipleDots(t *testing.T) {
32 got := getExtension(".travis.yml")
33 expected := "travis.yml"
· · ·
38}
39
40▶func TestGetExtensionMultipleExtensions(t *testing.T) {
41 got := getExtension("something.go.yml")
42 expected := "go.yml"
· · ·
47}
48
49▶func TestGetExtensionStartsWith(t *testing.T) {
50 got := getExtension(".gitignore")
51 expected := ".gitignore"
+ 26 more matches in this file
20
21// HistoryDepth is the maximum number of commits the history engine walks. 0
22▶// means "entire history". Wired to --depth in main.go.
23var HistoryDepth = 1000
24
· · ·
142// pass user input unchecked. A degenerate window (from == to or to before
143// from) yields Width=0; all commits land in bucket 0 / N-1.
144▶func NewBucketing(from, to time.Time, n int) Bucketing {
145 if n <= 0 {
146 n = 1
· · ·
156// clamp to 0 (defensive — should not happen given the walk window). Times at
157// or after To clamp to N-1.
158▶func (b Bucketing) Index(t time.Time) int {
159 if b.N <= 0 {
160 return 0
· · ·
181// Start returns the wall-clock start time of bucket i. Indexes outside
182// [0, N) are clamped.
183▶func (b Bucketing) Start(i int) time.Time {
184 if b.N <= 0 {
185 return b.From
· · ·
195
196// emptySnapshot is what observers see when HEAD is missing or empty.
197▶func emptySnapshot() HeadSnapshot {
198 return HeadSnapshot{Files: map[string]HeadFile{}}
199}
+ 27 more matches in this file
29// snapshots. Used to seed historyAuthorTimelineObserver with known author /
30// timestamp distributions.
31▶func makeTimelineRepo(t *testing.T, commits []timelineCommit) string {
32 t.Helper()
33 ProcessConstants()
· · ·
70}
71
72▶func findTimelineRow(t *testing.T, rows []authorTimelineRow, name string) authorTimelineRow {
73 t.Helper()
74 for _, r := range rows {
· · ·
81}
82
83▶func TestBucketingIndex(t *testing.T) {
84 from := time.Date(2025, 1, 1, 0, 0, 0, 0, time.UTC)
85 to := time.Date(2025, 1, 11, 0, 0, 0, 0, time.UTC) // 10-day span
· · ·
113}
114
115▶func TestBucketingDegenerateWindow(t *testing.T) {
116 when := time.Date(2025, 1, 1, 12, 0, 0, 0, time.UTC)
117 b := NewBucketing(when, when, 8)
· · ·
124}
125
126▶func TestBucketingStart(t *testing.T) {
127 from := time.Date(2025, 1, 1, 0, 0, 0, 0, time.UTC)
128 to := from.Add(10 * 24 * time.Hour)
+ 34 more matches in this file
18
19// authorsTopN is the cap on tabular rows for the author rollup. CSV/JSON
20▶// output is not capped. The remainder collapses into a single "others (N)"
21// row in the tabular table.
22const authorsTopN = 15
· · ·
77}
78
79▶func newHistoryAuthorsObserver() *historyAuthorsObserver {
80 return &historyAuthorsObserver{
81 blame: map[string][]authorID{},
· · ·
90// baseline snapshot — every pre-window line maps to sentinelAuthorID so
91// surviving untouched lines are correctly attributed to "(before window)".
92▶func (o *historyAuthorsObserver) Seed(baseline BaselineSnapshot) {
93 o.registry = newAuthorRegistry(baseline.Mailmap)
94 for path, bf := range baseline.Files {
· · ·
103}
104
105▶func (o *historyAuthorsObserver) Observe(c CommitInfo, changes []FileChange) {
106 aid := o.registry.intern(c.Author, c.Email)
107 if prev, ok := o.lastSeen[aid]; !ok || c.When.After(prev) {
· · ·
131}
132
133▶func (o *historyAuthorsObserver) Finalise(window HistoryWindow, head HeadSnapshot) {
134 o.window = window
135 o.snapshot = head
+ 22 more matches in this file
28// using the caller's named author. Used to exercise per-author attribution
29// in the authors observer.
30▶func makeAuthoredRepo(t *testing.T, commits []authoredCommit) string {
31 t.Helper()
32 ProcessConstants()
· · ·
72// findAuthorRow returns the row whose canonical name matches `name`, or
73// fails the test.
74▶func findAuthorRow(t *testing.T, rows []authorRow, name string) authorRow {
75 t.Helper()
76 for _, r := range rows {
· · ·
83}
84
85▶func TestAuthorsLastToucherAttribution(t *testing.T) {
86 saveDepth := HistoryDepth
87 HistoryDepth = 100
· · ·
88▶ t.Cleanup(func() { HistoryDepth = saveDepth })
89
90 // Alice introduces 7 lines; Bob rewrites lines 4–7 (4 lines).
· · ·
91 // Net: Alice owns 3, Bob owns 4. No (before window) — full history walked.
92▶ first := "package x\nfunc A() {}\nfunc B() {}\nfunc C() {}\nfunc D() {}\nfunc E() {}\nfunc F() {}\n"
93 // 7 lines: line1=package, line2=A, line3=B, line4=C, line5=D, line6=E, line7=F.
94 // We want Bob to rewrite lines 4-7 (4 lines).
+ 55 more matches in this file
30// name+email so two commit identities mapped to the same canonical pair
31// collapse to one authorID. When fold is true, a second index folds
32▶// distinct emails that share the same (lowercase name, email domain) — a
33// best-effort fallback for repos without a .mailmap.
34type authorRegistry struct {
· · ·
35 nameToID map[string]authorID
36▶ byNameDomain map[string]authorID
37 records []authorRecord
38 mm *mailmap
· · ·
40}
41
42▶func newAuthorRegistry(mm *mailmap) *authorRegistry {
43 return newAuthorRegistryWithFold(mm, FoldAuthors)
44}
· · ·
45
46▶func newAuthorRegistryWithFold(mm *mailmap, fold bool) *authorRegistry {
47 return &authorRegistry{
48 nameToID: map[string]authorID{},
· · ·
49▶ byNameDomain: map[string]authorID{},
50 records: []authorRecord{{}}, // slot 0 = sentinelAuthorID
51 mm: mm,
+ 16 more matches in this file
8)
9
10▶func TestApplyDiffToBlameNewFile(t *testing.T) {
11 got := applyDiffToBlame(nil, 3, []LineRange{{Start: 1, Count: 3}}, nil, 7)
12 want := []authorID{7, 7, 7}
· · ·
16}
17
18▶func TestApplyDiffToBlameAppend(t *testing.T) {
19 prev := []authorID{1, 1}
20 got := applyDiffToBlame(prev, 4, []LineRange{{Start: 3, Count: 2}}, nil, 9)
· · ·
25}
26
27▶func TestApplyDiffToBlamePureDelete(t *testing.T) {
28 prev := []authorID{1, 1, 1, 1}
29 got := applyDiffToBlame(prev, 2, nil, []LineRange{{Start: 2, Count: 2}}, 9)
· · ·
34}
35
36▶func TestApplyDiffToBlameReplaceMiddle(t *testing.T) {
37 // 5 lines from author 1; replace line 3 with two lines from author 2.
38 prev := []authorID{1, 1, 1, 1, 1}
· · ·
47}
48
49▶func TestApplyDiffToBlamePadsToNewLines(t *testing.T) {
50 // Diff arithmetic disagrees with newLines — defensive pad with sentinel.
51 got := applyDiffToBlame(nil, 4, nil, nil, 9)
+ 29 more matches in this file
69// 100%; multiplied by high test-file complexity that buries the real work.
70// Volume keeps the heavyweight couplings on top and matches --hotspots.
71▶func (c CouplingCount) WeightedScore() float64 {
72 return float64(c.Shared) * float64(min(c.ComplexityA, c.ComplexityB))
73}
· · ·
76// co-change first, then degree, then path. Shared by the raw sort and used as
77// the tiebreak under weighted ranking.
78▶func lessCouplingRaw(a, b CouplingCount) bool {
79 if a.Shared != b.Shared {
80 return a.Shared > b.Shared
· · ·
92// when the Cognitive global is on (matching --hotspots), cyclomatic otherwise.
93// A path absent from HEAD contributes zero, so it can never lift a pair's score.
94▶func headComplexity(head HeadSnapshot, path string) int64 {
95 hf, ok := head.Files[path]
96 if !ok {
· · ·
107// for the human-facing table only; the raw counts sit beside it so the number
108// is never a black box. Returns 0 when the union is empty.
109▶func (c CouplingCount) Degree() float64 {
110 union := c.CommitsA + c.CommitsB - c.Shared
111 if union <= 0 {
· · ·
141type pairKey struct{ a, b string }
142
143▶func newCouplingObserver() *couplingObserver {
144 return &couplingObserver{
145 maxFilesPerCommit: CouplingMaxFilesPerCommit,
+ 30 more matches in this file
11
12// hasCandidate reports whether want is among the candidate forms.
13▶func hasCandidate(got []string, want string) bool {
14 for _, g := range got {
15 if g == want {
· · ·
23// the bare git path. This was the original --coupling-for bug: the prefix was
24// passed through and never matched, after a full history walk.
25▶func TestCouplingTargetCandidatesStripsDotSlash(t *testing.T) {
26 got := couplingTargetCandidates("/repo", "./processor/constants.go")
27 if !hasCandidate(got, "processor/constants.go") {
· · ·
30}
31
32▶func TestCouplingTargetCandidatesBarePathUnchanged(t *testing.T) {
33 got := couplingTargetCandidates("/repo", "processor/constants.go")
34 if !hasCandidate(got, "processor/constants.go") {
· · ·
37}
38
39▶func TestCouplingTargetCandidatesAbsoluteBecomesRepoRelative(t *testing.T) {
40 got := couplingTargetCandidates("/repo", filepath.FromSlash("/repo/processor/constants.go"))
41 if !hasCandidate(got, "processor/constants.go") {
· · ·
46// A path outside the repository can never be a git path, so it must yield no
47// candidates rather than a "../" form that would be looked up and miss.
48▶func TestCouplingTargetCandidatesRejectsEscapingPaths(t *testing.T) {
49 if got := couplingTargetCandidates("/repo", filepath.FromSlash("/etc/passwd")); len(got) != 0 {
50 t.Errorf("expected no candidates for a path outside the repo, got %v", got)
+ 21 more matches in this file
24}
25
26▶func (h *historyIgnore) Match(p string, isDir bool) bool {
27 if h == nil || h.matcher == nil {
28 return false
· · ·
35// parses them, and produces a matcher. Respects the existing --no-ignore
36// (Ignore) and --no-scc-ignore (SccIgnore) flag globals.
37▶func buildHistoryIgnore(repo *git.Repository, head plumbing.Hash) (*historyIgnore, error) {
38 commit, err := repo.CommitObject(head)
39 if err != nil {
· · ·
46
47 var patterns []gitignore.Pattern
48▶ err = tree.Files().ForEach(func(f *object.File) error {
49 if f.Mode == filemode.Dir || f.Mode == filemode.Submodule || f.Mode == filemode.Symlink {
50 return nil
· · ·
65 defer reader.Close()
66
67▶ domain := splitDomain(path.Dir(f.Name))
68 patterns = append(patterns, parseIgnoreFile(reader, domain)...)
69 return nil
· · ·
68▶ patterns = append(patterns, parseIgnoreFile(reader, domain)...)
69 return nil
70 })
+ 3 more matches in this file
10)
11
12▶func TestParseIgnoreFileSkipsCommentsAndBlanks(t *testing.T) {
13 body := strings.NewReader("# comment\n\nfoo\n!bar\n \n")
14 pats := parseIgnoreFile(body, nil)
· · ·
18}
19
20▶func TestHistoryIgnoreMatchesPattern(t *testing.T) {
21 pat := gitignore.ParsePattern("vendor/", nil)
22 h := &historyIgnore{matcher: gitignore.NewMatcher([]gitignore.Pattern{pat})}
· · ·
30}
31
32▶func TestHistoryIgnoreNilSafe(t *testing.T) {
33 var h *historyIgnore
34 if h.Match("anything", false) {
· · ·
37}
38
39▶func TestSplitDomain(t *testing.T) {
40 cases := []struct {
41 in string
· · ·
48 }
49 for _, c := range cases {
50▶ got := splitDomain(c.in)
51 if len(got) != c.want {
52 t.Errorf("splitDomain(%q) = %v, want length %d", c.in, got, c.want)
+ 1 more matches in this file
12)
13
14▶func findLanguagesRow(t *testing.T, rows []languagesTimelineRow, language string) languagesTimelineRow {
15 t.Helper()
16 for _, r := range rows {
· · ·
26// TypeScript code is added over time while JavaScript code is steadily
27// removed, the trajectory and change sign should reflect that.
28▶func TestLanguagesTimelineTSRisesJSFalls(t *testing.T) {
29 // Set HistoryDepth so the JS-baseline commit (commit 0) sits OUTSIDE
30 // the window — the engine then seeds JavaScript with that file's lines
· · ·
33 saveDepth, saveBuckets := HistoryDepth, HistoryBuckets
34 HistoryDepth, HistoryBuckets = 9, 10
35▶ t.Cleanup(func() {
36 HistoryDepth, HistoryBuckets = saveDepth, saveBuckets
37 })
· · ·
105// of the window and is then wholly removed should show codeNow == 0 and a
106// negative change.
107▶func TestLanguagesTimelineLanguageRemoval(t *testing.T) {
108 // depth=2 → only the last 2 commits are in the window. The first
109 // commit (which establishes the JS file) sits OUTSIDE the window and
· · ·
112 saveDepth, saveBuckets := HistoryDepth, HistoryBuckets
113 HistoryDepth, HistoryBuckets = 2, 6
114▶ t.Cleanup(func() {
115 HistoryDepth, HistoryBuckets = saveDepth, saveBuckets
116 })
+ 26 more matches in this file
17// historyHeader renders the centred two-line "<break> <name> · last N
18// commits · from → to <break>" block that every tabular report uses.
19▶func historyHeader(reportName string, w HistoryWindow, wide bool) string {
20 break_ := tabularBreakFor(wide)
21 var sb strings.Builder
· · ·
27}
28
29▶func formatHeaderLine(reportName string, w HistoryWindow) string {
30 if w.Commits == 0 {
31 return reportName + " · no commits"
· · ·
39// produce, honouring --no-hborder and --ci. Centralised here so every
40// history renderer agrees with the language tables.
41▶func tabularBreakFor(wide bool) string {
42 if wide {
43 return getTabularWideBreak()
· · ·
49// Falls back to ASCII '#' when --ci is on or output is not a TTY (CSV-safe
50// callers should not use this helper).
51▶func renderBar(ratio float64, width int) string {
52 if width <= 0 {
53 return ""
· · ·
69 total := ratio * float64(width)
70 full := int(total)
71▶ remainder := total - float64(full)
72 var sb strings.Builder
73 for i := 0; i < full; i++ {
+ 7 more matches in this file
20// to detect languages from file names — same as a normal scc run — and the
21// engine itself only talks to go-git, so no shell-out happens.
22▶func makeFixtureRepo(t *testing.T, commits []map[string]string) string {
23 t.Helper()
24 ProcessConstants()
· · ·
70}
71
72▶func (c *captureObserver) Observe(info CommitInfo, changes []FileChange) {
73 c.commits = append(c.commits, info)
74 c.changes = append(c.changes, changes)
· · ·
75}
76
77▶func (c *captureObserver) Finalise(w HistoryWindow, s HeadSnapshot) {
78 c.window = w
79 c.snapshot = s
· · ·
80}
81
82▶func TestRunHistoryWalksOldestFirstAndCollectsChanges(t *testing.T) {
83 // Set depth/flags to defaults this test cares about.
84 saveDepth := HistoryDepth
· · ·
85 HistoryDepth = 100
86▶ t.Cleanup(func() { HistoryDepth = saveDepth })
87
88 dir := makeFixtureRepo(t, []map[string]string{
+ 20 more matches in this file
8)
9
10▶func TestLocomoComplexityDensityZeroCode(t *testing.T) {
11 got := LocomoComplexityDensity(10, 0)
12 if got != 0 {
· · ·
15}
16
17▶func TestLocomoComplexityDensity(t *testing.T) {
18 got := LocomoComplexityDensity(30, 100)
19 if math.Abs(got-0.3) > 0.001 {
· · ·
22}
23
24▶func TestLocomoComplexityFactor(t *testing.T) {
25 // density 0.3, weight 5 → 1 + sqrt(0.3)*5 ≈ 1 + 0.5477*5 ≈ 3.738
26 got := LocomoComplexityFactor(0.3, 5)
· · ·
30}
31
32▶func TestLocomoComplexityFactorLowDensity(t *testing.T) {
33 // density 0.05, weight 5 → 1 + sqrt(0.05)*5 ≈ 1 + 0.2236*5 ≈ 2.118
34 got := LocomoComplexityFactor(0.05, 5)
· · ·
38}
39
40▶func TestLocomoIterationFactor(t *testing.T) {
41 // density 0.3, base 1.5, weight 2 → 1.5 + sqrt(0.3)*2 ≈ 1.5 + 1.095 ≈ 2.595
42 got := LocomoIterationFactor(0.3, 1.5, 2)
+ 13 more matches in this file
174}
175
176▶func parseRemapRules(value string) []remapRule {
177 rules := []remapRule{}
178
· · ·
190}
191
192▶func newRemapConfig(remapAll string, remapUnknown string) remapConfig {
193 c := remapConfig{
194 all: parseRemapRules(remapAll),
· · ·
200 // guarantees that language was ever loaded — CountStats would then find no
201 // features and count the file as plain text, with no comments and no
202▶ // complexity. Done once here at setup rather than in the remap functions
203 // themselves, which run per file on the hot path.
204 for _, rule := range c.all {
· · ·
382
383// HistoryBuckets is the time-bucket resolution for the timeline reports.
384▶// Wired to --buckets in main.go; default 60.
385var HistoryBuckets = 60
386
· · ·
387▶// FoldAuthors enables the name+domain identity folding fallback applied
388// after the mailmap. Toggled off via --no-fold-authors.
389var FoldAuthors = true
+ 22 more matches in this file