Skip to content

Latest commit

 

History

History
1944 lines (1505 loc) · 130 KB

Metrics.md

File metadata and controls

1944 lines (1505 loc) · 130 KB

Metrics

Home

Static metrics are calculated from target-specific preprocessed MiniLang files inside the configured source roots. External imported modules, generated documentation, and excluded paths are not measured.

Project summary

Metric Value
Blank lines 405
Clone groups 105
Cognitive complexity 3062 (maximum per function: 108)
Comment lines 828
Cyclomatic complexity 2092 (average: 7.44, maximum: 54)
Documentation coverage 100% (69 of 69 documentation items)
Duplicated lines 509 (9.41%)
Files 13
Functions 281
Maintainability index 2.83 / 100
Physical lines 6640
Source lines 5407
Statements 4398

Documentation coverage

Coverage is split by documentation contract so strong API summaries cannot hide undocumented parameters or data members.

Category Documented Total Coverage
API declarations 30 30 100%
Constants 0 0 100%
Enum variants 0 0 100%
Fields 0 0 100%
Globals 0 0 100%
Overall 69 69 100%
Parameters 39 39 100%

Halstead metrics

Distinct operators Distinct operands Total operators Total operands Vocabulary Length Volume Difficulty Effort Estimated defects
40 2120 27465 20517 2160 47982 531487.77 193.56 102872966.93 177.16

Files

File SLOC Functions Cyclomatic total / avg / max Cognitive total / max Duplication Halstead volume MI
src/main.ml 4 1 1 / 1 / 1 0 / 0 0 (0%) 74.01 73.64
src/minidoc/analyzer.ml 905 42 415 / 9.88 / 46 629 / 84 13 (1.44%) 87306.42 0
src/minidoc/app.ml 160 10 53 / 5.3 / 13 49 / 12 0 (0%) 7953.14 17.48
src/minidoc/config.ml 374 18 216 / 12 / 54 357 / 108 0 (0%) 30321.89 0
src/minidoc/doc_comments.ml 262 11 88 / 8 / 22 118 / 39 0 (0%) 14954.39 6.18
src/minidoc/graph.ml 261 11 92 / 8.36 / 35 147 / 70 8 (3.07%) 16291.52 5.42
src/minidoc/loader.ml 257 14 104 / 7.43 / 19 151 / 32 0 (0%) 18893.45 3.5
src/minidoc/metrics.ml 826 38 291 / 7.66 / 44 438 / 101 7 (0.85%) 54695.15 0
src/minidoc/model.ml 301 6 6 / 1 / 1 0 / 0 23 (7.64%) 6354.93 18.5
src/minidoc/ordering.ml 185 14 57 / 4.07 / 12 64 / 27 33 (17.84%) 10559.56 14.7
src/minidoc/render_html.ml 705 40 286 / 7.15 / 43 440 / 80 188 (26.67%) 73233.97 0
src/minidoc/render_markdown.ml 719 38 275 / 7.24 / 38 421 / 71 204 (28.37%) 66347.29 0
src/minidoc/util.ml 448 38 208 / 5.47 / 24 248 / 42 33 (7.37%) 28457.77 0

Functions

Function Location LOC Statements Cyclomatic Cognitive Max nesting Halstead volume MI
main src/main.ml:18 3 1 1 0 0 46.51 77.78
minidoc.analyzer._addEnum src/minidoc/analyzer.ml:761 24 21 5 7 3 1786.26 46.45
minidoc.analyzer._addExternFunction src/minidoc/analyzer.ml:627 22 21 7 9 3 1805.65 46.97
minidoc.analyzer._addFunction src/minidoc/analyzer.ml:563 29 30 9 8 1 1881.69 43.96
minidoc.analyzer._addInterface src/minidoc/analyzer.ml:733 25 20 10 16 4 2101.33 44.9
minidoc.analyzer._addStruct src/minidoc/analyzer.ml:652 76 78 46 84 5 7168 25.79
minidoc.analyzer._addSymbol src/minidoc/analyzer.ml:178 45 18 5 5 2 1793.9 40.48
minidoc.analyzer._aliasTargetPackage src/minidoc/analyzer.ml:875 13 12 7 9 3 563.52 55.5
minidoc.analyzer._calleeName src/minidoc/analyzer.ml:449 10 9 5 5 2 324.33 59.93
minidoc.analyzer._diagnostic src/minidoc/analyzer.ml:141 4 2 1 0 0 317.29 69.22
minidoc.analyzer._fileById src/minidoc/analyzer.ml:148 7 6 4 4 2 279.68 63.9
minidoc.analyzer._findWord src/minidoc/analyzer.ml:116 22 20 10 13 2 1294.51 47.58
minidoc.analyzer._functionParameters src/minidoc/analyzer.ml:334 20 21 13 18 3 1404.19 47.83
minidoc.analyzer._functionSignature src/minidoc/analyzer.ml:373 17 19 9 8 1 826.57 51.52
minidoc.analyzer._insideDocumentation src/minidoc/analyzer.ml:106 7 6 6 6 2 335.77 63.07
minidoc.analyzer._isPositiveDecimal src/minidoc/analyzer.ml:240 10 9 6 6 2 413.59 59.06
minidoc.analyzer._isTestRoleTag src/minidoc/analyzer.ml:234 3 1 1 0 0 102.8 75.37
minidoc.analyzer._nameIndex src/minidoc/analyzer.ml:837 15 11 4 4 2 655.39 54.09
minidoc.analyzer._operatorQualifiedName src/minidoc/analyzer.ml:435 11 8 4 6 3 442.8 58.22
minidoc.analyzer._operatorSignature src/minidoc/analyzer.ml:424 8 8 3 2 1 375 61.87
minidoc.analyzer._operatorSourceSymbol src/minidoc/analyzer.ml:393 28 5 3 3 2 1022.11 46.96
minidoc.analyzer._parameterSignaturePieces src/minidoc/analyzer.ml:357 13 14 6 8 2 529.1 55.82
minidoc.analyzer._qualified src/minidoc/analyzer.ml:23 5 5 3 2 1 128.93 69.57
minidoc.analyzer._resolveCalls src/minidoc/analyzer.ml:891 33 32 15 25 3 2595.28 40.95
minidoc.analyzer._resolveTypeRelations src/minidoc/analyzer.ml:927 14 16 11 14 2 1116.45 52.18
minidoc.analyzer._resolveUnique src/minidoc/analyzer.ml:855 17 14 6 8 3 594.54 52.93
minidoc.analyzer._scope src/minidoc/analyzer.ml:31 3 1 1 0 0 53.15 77.38
minidoc.analyzer._summaryQualityEligible src/minidoc/analyzer.ml:990 7 8 4 3 1 447.7 62.46
minidoc.analyzer._symbolById src/minidoc/analyzer.ml:158 10 8 5 5 2 417.79 59.16
minidoc.analyzer._symbolId src/minidoc/analyzer.ml:171 4 2 1 0 0 165.67 71.19
minidoc.analyzer._typeName src/minidoc/analyzer.ml:37 6 6 4 3 1 180.09 66.69
minidoc.analyzer._validateCoverage src/minidoc/analyzer.ml:944 12 10 8 10 3 944.41 54.55
minidoc.analyzer._validateFunctionDoc src/minidoc/analyzer.ml:290 40 34 21 49 6 2579.35 38.34
minidoc.analyzer._validateSummaryQuality src/minidoc/analyzer.ml:1000 26 25 10 13 2 1765.23 45.05
minidoc.analyzer._validateTestFixtureUniqueness src/minidoc/analyzer.ml:959 28 28 15 42 6 1447.13 44.28
minidoc.analyzer._validateTestTags src/minidoc/analyzer.ml:253 33 29 29 38 3 2563.32 39.11
minidoc.analyzer._walkDeclarations src/minidoc/analyzer.ml:788 46 38 19 37 4 3338.5 36.5
minidoc.analyzer._walkExpression src/minidoc/analyzer.ml:462 35 25 19 25 3 2635.59 39.81
minidoc.analyzer._walkNested src/minidoc/analyzer.ml:597 27 17 16 29 4 1586.55 44.21
minidoc.analyzer._walkStatementsForCalls src/minidoc/analyzer.ml:500 60 44 28 59 6 4092.39 32.15
minidoc.analyzer._warningScopeIncludes src/minidoc/analyzer.ml:226 5 5 3 2 1 124 69.69
minidoc.analyzer.analyze src/minidoc/analyzer.ml:1030 25 21 3 3 2 1143.38 47.69
minidoc.analyzer.expressionText src/minidoc/analyzer.ml:47 54 59 30 41 4 3687.58 33.2
minidoc.app._countSeverity src/minidoc/app.ml:137 8 7 4 4 2 291.43 62.51
minidoc.app._generationTimestamp src/minidoc/app.ml:105 9 11 5 4 1 433.82 60.05
minidoc.app._hasArg src/minidoc/app.ml:117 7 6 5 5 2 264.4 63.93
minidoc.app._printDiagnostics src/minidoc/app.ml:127 7 5 3 2 1 391.73 63.01
minidoc.app._sourceDateEpochTimestamp src/minidoc/app.ml:82 18 15 11 12 2 934.87 50.34
minidoc.app.generate src/minidoc/app.ml:149 15 16 4 3 1 630.55 54.2
minidoc.app.printHelp src/minidoc/app.ml:38 39 37 1 0 0 455.81 46.54
minidoc.app.printVersion src/minidoc/app.ml:32 3 1 1 0 0 31.7 78.95
minidoc.app.render src/minidoc/app.ml:168 12 11 6 7 2 471.12 56.93
minidoc.app.run src/minidoc/app.ml:184 30 30 13 12 1 1335.36 44.14
minidoc.config._absoluteItems src/minidoc/config.ml:174 8 6 3 2 1 271.03 62.86
minidoc.config._applyCli src/minidoc/config.ml:348 68 60 54 102 3 4573.06 27.13
minidoc.config._applyFormats src/minidoc/config.ml:313 14 15 6 7 2 678.28 54.37
minidoc.config._applyGraphSelection src/minidoc/config.ml:330 15 12 5 7 2 587.76 54.28
minidoc.config._applyMiniDoc src/minidoc/config.ml:234 65 55 41 108 3 5600.49 28.69
minidoc.config._applyProject src/minidoc/config.ml:200 30 21 18 34 4 1612.65 42.9
minidoc.config._argValue src/minidoc/config.ml:303 7 6 4 4 2 278.83 63.9
minidoc.config._boolean src/minidoc/config.ml:88 6 6 3 2 1 203.56 66.46
minidoc.config._integer src/minidoc/config.ml:97 19 18 8 8 2 760.77 50.85
minidoc.config._manifestFromConfig src/minidoc/config.ml:185 12 9 5 5 2 461.82 57.13
minidoc.config._rowArray src/minidoc/config.ml:150 5 4 2 1 1 239.72 67.82
minidoc.config._rowBool src/minidoc/config.ml:158 5 4 2 1 1 239.72 67.82
minidoc.config._rowInt src/minidoc/config.ml:166 5 4 2 1 1 239.72 67.82
minidoc.config._rows src/minidoc/config.ml:119 20 18 8 10 2 1388.3 48.54
minidoc.config._rowString src/minidoc/config.ml:142 5 4 2 1 1 239.72 67.82
minidoc.config._stringArray src/minidoc/config.ml:44 41 34 19 32 3 1772.51 39.52
minidoc.config._unquote src/minidoc/config.ml:31 10 7 4 3 1 470 58.94
minidoc.config.load src/minidoc/config.ml:421 28 44 30 29 1 2748.45 40.32
minidoc.doc_comments._cleanBlockLine src/minidoc/doc_comments.ml:30 9 6 3 2 1 309.07 61.35
minidoc.doc_comments._finishPending src/minidoc/doc_comments.ml:126 4 3 2 1 1 209.59 70.34
minidoc.doc_comments._firstWord src/minidoc/doc_comments.ml:42 12 11 5 4 1 549.84 56.6
minidoc.doc_comments._parseBlock src/minidoc/doc_comments.ml:81 40 33 16 28 4 2217.46 39.47
minidoc.doc_comments._stripOneSpace src/minidoc/doc_comments.ml:21 6 3 3 2 1 189.99 66.67
minidoc.doc_comments._summaryAndDetails src/minidoc/doc_comments.ml:57 21 16 6 9 3 753.4 50.21
minidoc.doc_comments.documentationBefore src/minidoc/doc_comments.ml:288 16 15 10 11 2 752.38 52.25
minidoc.doc_comments.fileDocumentation src/minidoc/doc_comments.ml:256 26 25 7 8 2 1150.98 46.76
minidoc.doc_comments.hasTag src/minidoc/doc_comments.ml:324 8 7 6 6 2 403.55 61.25
minidoc.doc_comments.scan src/minidoc/doc_comments.ml:137 107 87 22 39 3 4621.17 27.11
minidoc.doc_comments.tagText src/minidoc/doc_comments.ml:310 9 8 8 8 2 511.82 59.14
minidoc.graph._addNode src/minidoc/graph.ml:123 5 5 4 3 1 269.34 67.2
minidoc.graph._entityOwned src/minidoc/graph.ml:67 16 11 8 13 3 728.36 52.62
minidoc.graph._entityPackage src/minidoc/graph.ml:45 19 13 9 20 4 701.69 50.97
minidoc.graph._hasEdge src/minidoc/graph.ml:131 7 6 5 5 2 296.13 63.59
minidoc.graph._nodeIndex src/minidoc/graph.ml:113 7 6 4 4 2 235.23 64.42
minidoc.graph._relationVisible src/minidoc/graph.ml:86 8 9 4 3 1 351.86 61.93
minidoc.graph._shortLabel src/minidoc/graph.ml:141 4 3 2 1 1 159.91 71.17
minidoc.graph._sortNodes src/minidoc/graph.ml:148 16 12 4 4 2 515.24 54.21
minidoc.graph._symbolLabel src/minidoc/graph.ml:29 13 9 7 12 3 533.62 55.66
minidoc.graph.hasRelations src/minidoc/graph.ml:99 11 12 10 12 2 657.86 56.21
minidoc.graph.renderSvg src/minidoc/graph.ml:170 146 150 35 70 4 8761.56 20.47
minidoc.loader._collectTree src/minidoc/loader.ml:70 22 22 10 12 2 1368.97 47.41
minidoc.loader._diagnostic src/minidoc/loader.ml:41 7 7 3 2 1 506.65 62.22
minidoc.loader._fileId src/minidoc/loader.ml:124 4 2 1 0 0 114.45 72.32
minidoc.loader._findFile src/minidoc/loader.ml:131 7 6 4 4 2 310.23 63.58
minidoc.loader._hasLicenseHeader src/minidoc/loader.ml:30 8 9 4 3 1 479.22 60.99
minidoc.loader._isExcluded src/minidoc/loader.ml:51 16 17 10 14 3 1049.97 51.23
minidoc.loader._isReachable src/minidoc/loader.ml:217 3 1 1 0 0 85.11 75.94
minidoc.loader._loadImports src/minidoc/loader.ml:232 35 35 14 25 3 2307.18 40.89
minidoc.loader._markReachable src/minidoc/loader.ml:223 6 5 4 4 2 317.29 64.97
minidoc.loader._parseFile src/minidoc/loader.ml:167 45 37 15 24 4 2704.76 37.89
minidoc.loader._programPackage src/minidoc/loader.ml:113 8 7 5 5 2 312.11 62.16
minidoc.loader._resolveImport src/minidoc/loader.ml:141 23 20 9 21 5 983.19 48.13
minidoc.loader.discover src/minidoc/loader.ml:96 14 14 5 5 2 599.09 54.88
minidoc.loader.loadProject src/minidoc/loader.ml:271 50 46 19 32 4 2699.46 36.36
minidoc.metrics._accumulateHalstead src/minidoc/metrics.ml:111 20 15 12 16 3 820.99 49.6
minidoc.metrics._appendFunctionAndNested src/minidoc/metrics.ml:610 4 2 1 0 0 179.85 70.94
minidoc.metrics._appendFunctionMetric src/minidoc/metrics.ml:544 31 15 6 8 3 1295.01 44.87
minidoc.metrics._asmBranches src/minidoc/metrics.ml:318 43 36 32 43 4 2282.8 36.55
minidoc.metrics._booleanOperators src/minidoc/metrics.ml:280 34 32 19 25 3 1726.54 41.37
minidoc.metrics._calculateDuplicates src/minidoc/metrics.ml:671 55 43 9 24 6 2663.86 36.84
minidoc.metrics._collectFunctions src/minidoc/metrics.ml:617 17 12 10 17 4 879.05 51.2
minidoc.metrics._commentFlags src/minidoc/metrics.ml:190 55 53 22 36 3 1826.52 36.24
minidoc.metrics._complexity src/minidoc/metrics.ml:441 4 2 1 0 0 106.61 72.53
minidoc.metrics._coverageMetric src/minidoc/metrics.ml:781 5 4 2 1 1 180.94 68.68
minidoc.metrics._duplicatedLineCount src/minidoc/metrics.ml:729 9 7 3 3 2 217.13 62.42
minidoc.metrics._findFunctionSymbol src/minidoc/metrics.ml:448 3 1 1 0 0 114.45 75.04
minidoc.metrics._finishHalstead src/minidoc/metrics.ml:134 24 11 4 3 1 729.46 49.31
minidoc.metrics._functionEndLine src/minidoc/metrics.ml:478 15 13 9 12 3 609.51 53.63
minidoc.metrics._functionTotals src/minidoc/metrics.ml:741 21 20 6 12 3 692.77 50.46
minidoc.metrics._halstead src/minidoc/metrics.ml:161 3 1 1 0 0 65.73 76.73
minidoc.metrics._isDocumentable src/minidoc/metrics.ml:765 5 4 2 1 1 257.62 67.6
minidoc.metrics._isDocumentableCallable src/minidoc/metrics.ml:773 5 4 2 1 1 197.42 68.41
minidoc.metrics._isMeasuredFile src/minidoc/metrics.ml:789 3 1 1 0 0 120 74.9
minidoc.metrics._maintainability src/minidoc/metrics.ml:532 9 11 5 4 1 459.04 59.87
minidoc.metrics._markWindow src/minidoc/metrics.ml:647 7 4 3 2 1 205.13 64.97
minidoc.metrics._newHalsteadAccumulator src/minidoc/metrics.ml:83 3 1 1 0 0 118.03 74.95
minidoc.metrics._normalizedLines src/minidoc/metrics.ml:167 20 18 8 9 2 1105.89 49.23
minidoc.metrics._recordOperand src/minidoc/metrics.ml:100 8 5 2 1 1 279.68 62.9
minidoc.metrics._recordOperator src/minidoc/metrics.ml:89 8 5 2 1 1 279.68 62.9
minidoc.metrics._round2 src/minidoc/metrics.ml:68 3 1 1 0 0 66.61 76.69
minidoc.metrics._sourceData src/minidoc/metrics.ml:248 29 16 7 13 3 905.86 46.45
minidoc.metrics._sourceDataById src/minidoc/metrics.ml:637 7 6 4 4 2 239.75 64.36
minidoc.metrics._sourceLines src/minidoc/metrics.ml:496 14 10 7 9 3 598.26 54.61
minidoc.metrics._sourceSlice src/minidoc/metrics.ml:513 16 17 6 5 1 691.85 53.04
minidoc.metrics._startsFunction src/minidoc/metrics.ml:454 9 4 4 3 1 446.93 60.09
minidoc.metrics._startsOperator src/minidoc/metrics.ml:471 4 2 1 0 0 165.67 71.19
minidoc.metrics._tokenValue src/minidoc/metrics.ml:74 6 5 2 1 1 284.6 65.57
minidoc.metrics._touchNesting src/minidoc/metrics.ml:364 4 3 2 1 1 97.67 72.67
minidoc.metrics._walkComplexity src/minidoc/metrics.ml:371 67 51 30 50 4 3947.23 30.95
minidoc.metrics._walkNestedFunctions src/minidoc/metrics.ml:578 29 19 16 29 4 1681.63 43.36
minidoc.metrics._windowFingerprint src/minidoc/metrics.ml:657 11 9 3 3 2 346.79 59.09
minidoc.metrics.calculate src/minidoc/metrics.ml:796 180 131 44 101 5 9204.17 17.13
minidoc.model.defaultConfig src/minidoc/model.ml:321 37 1 1 0 0 437.22 47.17
minidoc.model.emptyDocBlock src/minidoc/model.ml:361 3 1 1 0 0 121.84 74.85
minidoc.model.emptyHalsteadMetrics src/minidoc/model.ml:387 3 1 1 0 0 96.34 75.57
minidoc.model.emptyProject src/minidoc/model.ml:381 3 1 1 0 0 180 73.67
minidoc.model.emptyProjectMetrics src/minidoc/model.ml:393 5 3 1 0 0 397.62 66.42
minidoc.model.newDiagnostic src/minidoc/model.ml:373 3 1 1 0 0 121.84 74.85
minidoc.ordering._compareBytes src/minidoc/ordering.ml:30 11 13 7 8 2 481.42 57.56
minidoc.ordering._entityNames src/minidoc/ordering.ml:149 16 10 5 6 2 605.41 53.58
minidoc.ordering._sortCloneGroups src/minidoc/ordering.ml:216 9 7 3 2 1 529.66 59.71
minidoc.ordering._sortDiagnostics src/minidoc/ordering.ml:138 8 6 3 2 1 493.48 61.04
minidoc.ordering._sortFileMetrics src/minidoc/ordering.ml:183 8 6 3 2 1 293.25 62.62
minidoc.ordering._sortFiles src/minidoc/ordering.ml:105 8 6 3 2 1 293.25 62.62
minidoc.ordering._sortFunctionMetrics src/minidoc/ordering.ml:194 8 6 3 2 1 395 61.72
minidoc.ordering._sortImports src/minidoc/ordering.ml:127 8 6 3 2 1 395 61.72
minidoc.ordering._sortLess src/minidoc/ordering.ml:44 5 4 2 1 1 194.49 68.46
minidoc.ordering._sortOccurrences src/minidoc/ordering.ml:205 8 6 3 2 1 346.79 62.11
minidoc.ordering._sortRelations src/minidoc/ordering.ml:168 12 10 3 2 1 632.19 56.44
minidoc.ordering._sortSymbols src/minidoc/ordering.ml:116 8 6 3 2 1 395 61.72
minidoc.ordering._sortWithKeys src/minidoc/ordering.ml:54 48 40 12 27 4 1656.34 39.17
minidoc.ordering.apply src/minidoc/ordering.ml:229 18 13 4 4 2 955.58 51.21
minidoc.render_html._css src/minidoc/render_html.ml:745 3 1 1 0 0 22.46 80
minidoc.render_html._dependencies src/minidoc/render_html.ml:580 15 13 5 9 3 842 53.19
minidoc.render_html._dependencyReferenceCount src/minidoc/render_html.ml:564 13 14 7 11 3 665.96 54.99
minidoc.render_html._diagnostics src/minidoc/render_html.ml:617 12 11 3 2 1 786.06 55.78
minidoc.render_html._file src/minidoc/render_html.ml:520 41 43 22 43 4 3375.71 37.15
minidoc.render_html._fileById src/minidoc/render_html.ml:53 7 6 4 4 2 279.68 63.9
minidoc.render_html._filePage src/minidoc/render_html.ml:80 3 1 1 0 0 76.15 76.28
minidoc.render_html._files src/minidoc/render_html.ml:361 17 16 6 12 3 903.52 51.65
minidoc.render_html._fileVisible src/minidoc/render_html.ml:22 4 3 2 1 1 191.76 70.61
minidoc.render_html._graphEnabled src/minidoc/render_html.ml:73 4 3 2 1 1 159.91 71.17
minidoc.render_html._graphPage src/minidoc/render_html.ml:718 5 4 2 1 1 315.77 66.98
minidoc.render_html._hasDependencies src/minidoc/render_html.ml:63 7 6 4 4 2 351.75 63.2
minidoc.render_html._home src/minidoc/render_html.ml:325 33 36 11 13 3 2621.84 41.46
minidoc.render_html._isType src/minidoc/render_html.ml:37 3 1 1 0 0 148 74.26
minidoc.render_html._javascript src/minidoc/render_html.ml:751 3 1 1 0 0 22.46 80
minidoc.render_html._layout src/minidoc/render_html.ml:287 14 15 5 4 1 1173.62 52.83
minidoc.render_html._markdownHtml src/minidoc/render_html.ml:122 38 44 17 30 3 2586.64 39.36
minidoc.render_html._metrics src/minidoc/render_html.ml:632 76 70 14 31 5 8435.83 29.6
minidoc.render_html._ownerType src/minidoc/render_html.ml:98 10 9 5 6 2 299.56 60.17
minidoc.render_html._package src/minidoc/render_html.ml:493 24 23 12 23 3 1476.64 46.09
minidoc.render_html._packagePage src/minidoc/render_html.ml:92 3 1 1 0 0 66.61 76.69
minidoc.render_html._packages src/minidoc/render_html.ml:304 11 11 5 6 2 483.31 57.82
minidoc.render_html._packagesIndex src/minidoc/render_html.ml:478 12 8 3 3 2 486.26 57.24
minidoc.render_html._projectDescription src/minidoc/render_html.ml:318 4 3 2 1 1 130.8 71.78
minidoc.render_html._searchIndex src/minidoc/render_html.ml:726 16 14 5 9 3 955.31 52.19
minidoc.render_html._sortTags src/minidoc/render_html.ml:173 16 12 4 4 2 515.24 54.21
minidoc.render_html._symbolById src/minidoc/render_html.ml:43 7 6 4 4 2 279.68 63.9
minidoc.render_html._symbolFixtureRole src/minidoc/render_html.ml:418 7 5 3 3 2 257.47 64.28
minidoc.render_html._symbolHasTag src/minidoc/render_html.ml:397 7 6 4 4 2 263.22 64.08
minidoc.render_html._symbolHtml src/minidoc/render_html.ml:192 92 94 43 80 3 7991.64 24.05
minidoc.render_html._symbolLink src/minidoc/render_html.ml:111 8 9 4 3 1 423.05 61.37
minidoc.render_html._symbols src/minidoc/render_html.ml:381 13 10 4 6 3 707.45 55.21
minidoc.render_html._symbolTagKeys src/minidoc/render_html.ml:407 8 7 5 5 2 407.27 61.35
minidoc.render_html._tagValue src/minidoc/render_html.ml:163 7 6 4 4 2 296.13 63.72
minidoc.render_html._tests src/minidoc/render_html.ml:428 47 47 19 43 4 3151.41 36.47
minidoc.render_html._type src/minidoc/render_html.ml:598 16 15 6 8 3 1019.29 51.86
minidoc.render_html._typePage src/minidoc/render_html.ml:86 3 1 1 0 0 76.15 76.28
minidoc.render_html._visible src/minidoc/render_html.ml:29 5 4 3 2 1 232.19 67.78
minidoc.render_html._writeGenerated src/minidoc/render_html.ml:757 5 4 2 1 1 222.91 68.04
minidoc.render_html.render src/minidoc/render_html.ml:766 81 93 39 59 4 7345.4 26.05
minidoc.render_markdown._appendSymbol src/minidoc/render_markdown.ml:230 38 39 10 16 3 2211.77 40.77
minidoc.render_markdown._appendTagSections src/minidoc/render_markdown.ml:123 85 79 36 71 3 4521.6 27.48
minidoc.render_markdown._dependencyReferenceCount src/minidoc/render_markdown.ml:548 13 14 7 11 3 665.96 54.99
minidoc.render_markdown._fileById src/minidoc/render_markdown.ml:54 7 6 4 4 2 279.68 63.9
minidoc.render_markdown._filePage src/minidoc/render_markdown.ml:81 3 1 1 0 0 76.15 76.28
minidoc.render_markdown._fileVisible src/minidoc/render_markdown.ml:23 4 3 2 1 1 191.76 70.61
minidoc.render_markdown._graphEnabled src/minidoc/render_markdown.ml:74 4 3 2 1 1 159.91 71.17
minidoc.render_markdown._hasDependencies src/minidoc/render_markdown.ml:64 7 6 4 4 2 351.75 63.2
minidoc.render_markdown._homeName src/minidoc/render_markdown.ml:720 4 3 2 1 1 88 72.98
minidoc.render_markdown._indentedCode src/minidoc/render_markdown.ml:618 10 6 3 3 2 318.95 60.25
minidoc.render_markdown._isType src/minidoc/render_markdown.ml:38 3 1 1 0 0 148 74.26
minidoc.render_markdown._ownerType src/minidoc/render_markdown.ml:99 10 9 5 6 2 299.56 60.17
minidoc.render_markdown._packagePage src/minidoc/render_markdown.ml:93 3 1 1 0 0 66.61 76.69
minidoc.render_markdown._packages src/minidoc/render_markdown.ml:271 11 11 5 6 2 483.31 57.82
minidoc.render_markdown._projectDescription src/minidoc/render_markdown.ml:285 4 3 2 1 1 130.8 71.78
minidoc.render_markdown._renderDependencies src/minidoc/render_markdown.ml:564 16 14 5 9 3 929.18 52.28
minidoc.render_markdown._renderDiagnostics src/minidoc/render_markdown.ml:604 11 10 3 2 1 795.78 56.57
minidoc.render_markdown._renderFile src/minidoc/render_markdown.ml:501 44 44 22 43 4 3135.37 36.71
minidoc.render_markdown._renderFiles src/minidoc/render_markdown.ml:340 17 16 6 12 3 956.59 51.48
minidoc.render_markdown._renderGraphPage src/minidoc/render_markdown.ml:749 8 7 2 1 1 425.73 61.62
minidoc.render_markdown._renderHome src/minidoc/render_markdown.ml:292 45 47 14 17 3 3249.59 37.46
minidoc.render_markdown._renderMetrics src/minidoc/render_markdown.ml:631 81 75 14 31 5 8501.63 28.97
minidoc.render_markdown._renderPackage src/minidoc/render_markdown.ml:472 26 23 12 23 3 1440 45.4
minidoc.render_markdown._renderPackagesIndex src/minidoc/render_markdown.ml:458 11 7 3 3 2 461.82 58.22
minidoc.render_markdown._renderSidebar src/minidoc/render_markdown.ml:727 19 20 9 9 2 1262.29 49.18
minidoc.render_markdown._renderSymbols src/minidoc/render_markdown.ml:360 13 10 4 6 3 754.43 55.01
minidoc.render_markdown._renderTests src/minidoc/render_markdown.ml:407 48 48 19 43 4 3251.69 36.18
minidoc.render_markdown._renderType src/minidoc/render_markdown.ml:583 18 13 7 10 3 1026.71 50.59
minidoc.render_markdown._sortTags src/minidoc/render_markdown.ml:211 16 12 4 4 2 515.24 54.21
minidoc.render_markdown._symbolById src/minidoc/render_markdown.ml:44 7 6 4 4 2 279.68 63.9
minidoc.render_markdown._symbolFixtureRole src/minidoc/render_markdown.ml:397 7 5 3 3 2 257.47 64.28
minidoc.render_markdown._symbolHasTag src/minidoc/render_markdown.ml:376 7 6 4 4 2 263.22 64.08
minidoc.render_markdown._symbolLink src/minidoc/render_markdown.ml:112 8 9 4 3 1 423.05 61.37
minidoc.render_markdown._symbolTagKeys src/minidoc/render_markdown.ml:386 8 7 5 5 2 407.27 61.35
minidoc.render_markdown._typePage src/minidoc/render_markdown.ml:87 3 1 1 0 0 76.15 76.28
minidoc.render_markdown._visible src/minidoc/render_markdown.ml:30 5 4 3 2 1 232.19 67.78
minidoc.render_markdown._writeGenerated src/minidoc/render_markdown.ml:760 9 8 4 3 1 491.14 59.8
minidoc.render_markdown.render src/minidoc/render_markdown.ml:773 80 89 38 59 4 6165.32 26.84
minidoc.util._gitDirectory src/minidoc/util.ml:304 9 9 3 2 1 464.08 60.11
minidoc.util._optionalText src/minidoc/util.ml:295 6 6 3 2 1 217.13 66.26
minidoc.util._packedRevision src/minidoc/util.ml:316 12 12 8 9 2 693.35 55.49
minidoc.util._stringLess src/minidoc/util.ml:499 13 13 5 6 2 466.31 56.34
minidoc.util.absolutePath src/minidoc/util.ml:133 5 5 4 3 1 214.05 67.9
minidoc.util.addUnique src/minidoc/util.ml:586 4 3 2 1 1 105.49 72.43
minidoc.util.alphabeticalLess src/minidoc/util.ml:517 8 7 2 1 1 253.32 63.2
minidoc.util.containsString src/minidoc/util.ml:576 7 6 5 5 2 264.4 63.93
minidoc.util.currentDirectory src/minidoc/util.ml:125 5 4 3 2 1 146.95 69.17
minidoc.util.directoryName src/minidoc/util.ml:141 8 9 7 6 1 466.76 60.67
minidoc.util.ensureDirectory src/minidoc/util.ml:237 13 14 9 9 2 456.47 55.87
minidoc.util.fileName src/minidoc/util.ml:152 6 5 3 2 1 283.63 65.45
minidoc.util.gitRevision src/minidoc/util.ml:332 26 29 10 23 3 1147.8 46.36
minidoc.util.hashText src/minidoc/util.ml:401 11 8 4 4 2 366.3 58.79
minidoc.util.htmlEscape src/minidoc/util.ml:447 9 7 1 0 0 339.29 61.33
minidoc.util.isAbsolute src/minidoc/util.ml:44 6 6 3 2 1 236.84 66
minidoc.util.isProjectSource src/minidoc/util.ml:190 10 10 7 7 2 482.81 58.45
minidoc.util.isSafeUrl src/minidoc/util.ml:593 4 2 1 0 0 316.36 69.23
minidoc.util.isWhitespaceChar src/minidoc/util.ml:362 3 1 1 0 0 85.11 75.94
minidoc.util.joinPath src/minidoc/util.ml:116 6 7 7 6 1 357.36 64.21
minidoc.util.jsonEscape src/minidoc/util.ml:470 9 7 1 0 0 339.29 61.33
minidoc.util.lineAndColumn src/minidoc/util.ml:381 17 13 7 9 3 479.22 53.45
minidoc.util.markdownTableEscape src/minidoc/util.ml:459 8 6 1 0 0 272.32 63.12
minidoc.util.normalizePath src/minidoc/util.ml:53 58 50 24 42 5 2119.68 35.01
minidoc.util.onlyWhitespace src/minidoc/util.ml:368 10 12 7 7 2 420 58.88
minidoc.util.pathKey src/minidoc/util.ml:170 4 2 1 0 0 74.01 73.64
minidoc.util.pathsEqual src/minidoc/util.ml:181 3 1 1 0 0 65.73 76.73
minidoc.util.readText src/minidoc/util.ml:286 6 6 3 2 1 217.13 66.26
minidoc.util.relativePath src/minidoc/util.ml:203 27 26 14 20 3 1244.75 45.22
minidoc.util.removeStaleGenerated src/minidoc/util.ml:267 16 18 11 13 2 1029.46 51.16
minidoc.util.replaceSlashes src/minidoc/util.ml:37 4 3 2 1 1 127.44 71.86
minidoc.util.revisionLabel src/minidoc/util.ml:24 10 10 11 11 2 611.46 57.2
minidoc.util.slug src/minidoc/util.ml:415 23 19 8 13 4 886.25 48.58
minidoc.util.sortedStrings src/minidoc/util.ml:528 44 37 12 27 4 1366.43 40.58
minidoc.util.sourceUrl src/minidoc/util.ml:482 14 15 9 8 1 811.96 53.42
minidoc.util.stableSlug src/minidoc/util.ml:441 3 1 1 0 0 65.73 76.73
minidoc.util.stem src/minidoc/util.ml:161 6 5 3 2 1 232.19 66.06
minidoc.util.writeText src/minidoc/util.ml:253 9 10 4 3 1 377.83 60.6

Code duplication

A clone group is an exact sequence of 6 normalized, contiguous code lines found more than once. Comments and formatting whitespace are ignored. Duplicated-line totals count overlapping windows only once.

Found 105 clone group(s). At most 105 groups are shown.

Clone 1 — 3 occurrences
function _fileById ( project , id )
if len ( project . files ) == 0 then return 0 end if
for i = 0 to len ( project . files ) - 1
if project . files [ i ] . id == id then return project . files [ i ] end if
end for
return 0
Clone 2 — 3 occurrences
if len ( project . files ) == 0 then return 0 end if
for i = 0 to len ( project . files ) - 1
if project . files [ i ] . id == id then return project . files [ i ] end if
end for
return 0
end function
Clone 3 — 3 occurrences
if len ( project . symbols ) == 0 then return 0 end if
for i = 0 to len ( project . symbols ) - 1
if project . symbols [ i ] . id == id then return project . symbols [ i ] end if
end for
return 0
end function
Clone 4 — 3 occurrences
result [ before + 1 ] = result [ before ]
before = before - 1
end while
result [ before + 1 ] = value
index = index + 1
end while
Clone 5 — 3 occurrences
before = before - 1
end while
result [ before + 1 ] = value
index = index + 1
end while
return result
Clone 6 — 3 occurrences
end while
result [ before + 1 ] = value
index = index + 1
end while
return result
end function
Clone 7 — 2 occurrences
duplicated_lines ,
duplication_percent ,
clone_group_count ,
documented_symbols ,
documentable_symbols ,
documentation_coverage ,
Clone 8 — 2 occurrences
duplication_percent ,
clone_group_count ,
documented_symbols ,
documentable_symbols ,
documentation_coverage ,
documentation ,
Clone 9 — 2 occurrences
function_count ,
statement_count ,
cyclomatic_complexity ,
average_cyclomatic_complexity ,
maximum_cyclomatic_complexity ,
cognitive_complexity ,
Clone 10 — 2 occurrences
statement_count ,
cyclomatic_complexity ,
average_cyclomatic_complexity ,
maximum_cyclomatic_complexity ,
cognitive_complexity ,
maximum_cognitive_complexity ,
Clone 11 — 2 occurrences
cyclomatic_complexity ,
average_cyclomatic_complexity ,
maximum_cyclomatic_complexity ,
cognitive_complexity ,
maximum_cognitive_complexity ,
duplicated_lines ,
Clone 12 — 2 occurrences
average_cyclomatic_complexity ,
maximum_cyclomatic_complexity ,
cognitive_complexity ,
maximum_cognitive_complexity ,
duplicated_lines ,
duplication_percent ,
Clone 13 — 2 occurrences
width = 1
while width < count
left = 0
while left < count
middle = left + width
if middle > count then middle = count end if
Clone 14 — 2 occurrences
while width < count
left = 0
while left < count
middle = left + width
if middle > count then middle = count end if
right = left + width * 2
Clone 15 — 2 occurrences
left = 0
while left < count
middle = left + width
if middle > count then middle = count end if
right = left + width * 2
if right > count then right = count end if
Clone 16 — 2 occurrences
while left < count
middle = left + width
if middle > count then middle = count end if
right = left + width * 2
if right > count then right = count end if
li = left
Clone 17 — 2 occurrences
middle = left + width
if middle > count then middle = count end if
right = left + width * 2
if right > count then right = count end if
li = left
ri = middle
Clone 18 — 2 occurrences
if middle > count then middle = count end if
right = left + width * 2
if right > count then right = count end if
li = left
ri = middle
target = left
Clone 19 — 2 occurrences
right = left + width * 2
if right > count then right = count end if
li = left
ri = middle
target = left
while target < right
Clone 20 — 2 occurrences
if right > count then right = count end if
li = left
ri = middle
target = left
while target < right
if li >= middle then
Clone 21 — 2 occurrences
li = left
ri = middle
target = left
while target < right
if li >= middle then
destination [ target ] = source [ ri ]
Clone 22 — 2 occurrences
ri = middle
target = left
while target < right
if li >= middle then
destination [ target ] = source [ ri ]
ri = ri + 1
Clone 23 — 2 occurrences
target = left
while target < right
if li >= middle then
destination [ target ] = source [ ri ]
ri = ri + 1
else if ri >= right then
Clone 24 — 2 occurrences
while target < right
if li >= middle then
destination [ target ] = source [ ri ]
ri = ri + 1
else if ri >= right then
destination [ target ] = source [ li ]
Clone 25 — 2 occurrences
if li >= middle then
destination [ target ] = source [ ri ]
ri = ri + 1
else if ri >= right then
destination [ target ] = source [ li ]
li = li + 1
Clone 26 — 2 occurrences
destination [ target ] = source [ ri ]
ri = ri + 1
else
destination [ target ] = source [ li ]
li = li + 1
end if
Clone 27 — 2 occurrences
ri = ri + 1
else
destination [ target ] = source [ li ]
li = li + 1
end if
target = target + 1
Clone 28 — 2 occurrences
else
destination [ target ] = source [ li ]
li = li + 1
end if
target = target + 1
end while
Clone 29 — 2 occurrences
destination [ target ] = source [ li ]
li = li + 1
end if
target = target + 1
end while
left = left + width * 2
Clone 30 — 2 occurrences
li = li + 1
end if
target = target + 1
end while
left = left + width * 2
end while
Clone 31 — 2 occurrences
end if
target = target + 1
end while
left = left + width * 2
end while
swap = source
Clone 32 — 2 occurrences
target = target + 1
end while
left = left + width * 2
end while
swap = source
source = destination
Clone 33 — 2 occurrences
end while
left = left + width * 2
end while
swap = source
source = destination
destination = swap
Clone 34 — 2 occurrences
left = left + width * 2
end while
swap = source
source = destination
destination = swap
width = width * 2
Clone 35 — 2 occurrences
end while
swap = source
source = destination
destination = swap
width = width * 2
end while
Clone 36 — 2 occurrences
while typeof ( current ) == "struct" and current . container_id != ""
parent = _symbolById ( project , current . container_id )
if typeof ( parent ) != "struct" then break end if
if _isType ( parent ) then return parent end if
current = parent
end while
Clone 37 — 2 occurrences
parent = _symbolById ( project , current . container_id )
if typeof ( parent ) != "struct" then break end if
if _isType ( parent ) then return parent end if
current = parent
end while
return 0
Clone 38 — 2 occurrences
if typeof ( parent ) != "struct" then break end if
if _isType ( parent ) then return parent end if
current = parent
end while
return 0
end function
Clone 39 — 2 occurrences
function _symbolLink ( project , doc_symbol )
if _isType ( doc_symbol ) then return _typePage ( doc_symbol ) end if
owner = _ownerType ( project , doc_symbol )
if typeof ( owner ) == "struct" then return _typePage ( owner ) + "#" + doc_symbol . id end if
file = _fileById ( project , doc_symbol . file_id )
if typeof ( file ) == "struct" then return _filePage ( file ) + "#" + doc_symbol . id end if
Clone 40 — 2 occurrences
function _sortTags ( tags )
result = tags
index = 1
while index < len ( result )
value = result [ index ]
before = index - 1
Clone 41 — 2 occurrences
result = tags
index = 1
while index < len ( result )
value = result [ index ]
before = index - 1
value_key = value . key + "\n" + value . text
Clone 42 — 2 occurrences
index = 1
while index < len ( result )
value = result [ index ]
before = index - 1
value_key = value . key + "\n" + value . text
while before >= 0 and util . alphabeticalLess ( value_key , result [ before ] . key + "\n" + result [ before ] . text )
Clone 43 — 2 occurrences
while index < len ( result )
value = result [ index ]
before = index - 1
value_key = value . key + "\n" + value . text
while before >= 0 and util . alphabeticalLess ( value_key , result [ before ] . key + "\n" + result [ before ] . text )
result [ before + 1 ] = result [ before ]
Clone 44 — 2 occurrences
value = result [ index ]
before = index - 1
value_key = value . key + "\n" + value . text
while before >= 0 and util . alphabeticalLess ( value_key , result [ before ] . key + "\n" + result [ before ] . text )
result [ before + 1 ] = result [ before ]
before = before - 1
Clone 45 — 2 occurrences
before = index - 1
value_key = value . key + "\n" + value . text
while before >= 0 and util . alphabeticalLess ( value_key , result [ before ] . key + "\n" + result [ before ] . text )
result [ before + 1 ] = result [ before ]
before = before - 1
end while
Clone 46 — 2 occurrences
value_key = value . key + "\n" + value . text
while before >= 0 and util . alphabeticalLess ( value_key , result [ before ] . key + "\n" + result [ before ] . text )
result [ before + 1 ] = result [ before ]
before = before - 1
end while
result [ before + 1 ] = value
Clone 47 — 2 occurrences
while before >= 0 and util . alphabeticalLess ( value_key , result [ before ] . key + "\n" + result [ before ] . text )
result [ before + 1 ] = result [ before ]
before = before - 1
end while
result [ before + 1 ] = value
index = index + 1
Clone 48 — 2 occurrences
for i = 0 to len ( doc_symbol . parameters ) - 1
parameter = doc_symbol . parameters [ i ]
name = parameter . name
if parameter . variadic then name = name + "..." end if
type_name = parameter . type_name
if type_name == "" then type_name = "dynamic" end if
Clone 49 — 2 occurrences
test_role = ""
test_name = ""
skip_reason = ""
timeout = ""
categories = [ ]
covers = [ ]
Clone 50 — 2 occurrences
test_name = ""
skip_reason = ""
timeout = ""
categories = [ ]
covers = [ ]
if len ( doc_symbol . tags ) > 0 then
Clone 51 — 2 occurrences
skip_reason = ""
timeout = ""
categories = [ ]
covers = [ ]
if len ( doc_symbol . tags ) > 0 then
for i = 0 to len ( doc_symbol . tags ) - 1
Clone 52 — 2 occurrences
timeout = ""
categories = [ ]
covers = [ ]
if len ( doc_symbol . tags ) > 0 then
for i = 0 to len ( doc_symbol . tags ) - 1
tag = doc_symbol . tags [ i ]
Clone 53 — 2 occurrences
else if tag . name == "testmethod" then test_role = "test method" test_name = tag . text
else if tag . name == "beforeall" or tag . name == "afterall" or tag . name == "beforeeach" or tag . name == "aftereach" then test_role = "fixture " + tag . name
else if tag . name == "skip" then skip_reason = tag . text
else if tag . name == "timeout" then timeout = tag . key
else if tag . name == "category" then categories = categories + [ tag . key ]
else if tag . name == "covers" then covers = covers + [ tag . key ]
Clone 54 — 2 occurrences
else if tag . name == "beforeall" or tag . name == "afterall" or tag . name == "beforeeach" or tag . name == "aftereach" then test_role = "fixture " + tag . name
else if tag . name == "skip" then skip_reason = tag . text
else if tag . name == "timeout" then timeout = tag . key
else if tag . name == "category" then categories = categories + [ tag . key ]
else if tag . name == "covers" then covers = covers + [ tag . key ]
end if
Clone 55 — 2 occurrences
else if tag . name == "skip" then skip_reason = tag . text
else if tag . name == "timeout" then timeout = tag . key
else if tag . name == "category" then categories = categories + [ tag . key ]
else if tag . name == "covers" then covers = covers + [ tag . key ]
end if
end for
Clone 56 — 2 occurrences
else if tag . name == "timeout" then timeout = tag . key
else if tag . name == "category" then categories = categories + [ tag . key ]
else if tag . name == "covers" then covers = covers + [ tag . key ]
end if
end for
end if
Clone 57 — 2 occurrences
function _packages ( project )
result = [ ]
if len ( project . files ) == 0 then return result end if
for i = 0 to len ( project . files ) - 1
if _fileVisible ( project , project . files [ i ] ) == false then continue end if
name = project . files [ i ] . package_name
Clone 58 — 2 occurrences
result = [ ]
if len ( project . files ) == 0 then return result end if
for i = 0 to len ( project . files ) - 1
if _fileVisible ( project , project . files [ i ] ) == false then continue end if
name = project . files [ i ] . package_name
if name == "" then name = "(global)" end if
Clone 59 — 2 occurrences
if len ( project . files ) == 0 then return result end if
for i = 0 to len ( project . files ) - 1
if _fileVisible ( project , project . files [ i ] ) == false then continue end if
name = project . files [ i ] . package_name
if name == "" then name = "(global)" end if
result = util . addUnique ( result , name )
Clone 60 — 2 occurrences
for i = 0 to len ( project . files ) - 1
if _fileVisible ( project , project . files [ i ] ) == false then continue end if
name = project . files [ i ] . package_name
if name == "" then name = "(global)" end if
result = util . addUnique ( result , name )
end for
Clone 61 — 2 occurrences
if _fileVisible ( project , project . files [ i ] ) == false then continue end if
name = project . files [ i ] . package_name
if name == "" then name = "(global)" end if
result = util . addUnique ( result , name )
end for
return util . sortedStrings ( result )
Clone 62 — 2 occurrences
name = project . files [ i ] . package_name
if name == "" then name = "(global)" end if
result = util . addUnique ( result , name )
end for
return util . sortedStrings ( result )
end function
Clone 63 — 2 occurrences
if len ( project . files ) > 0 then
for i = 0 to len ( project . files ) - 1
file = project . files [ i ]
if _fileVisible ( project , file ) == false then continue end if
package_name = file . package_name
if package_name == "" then package_name = "(global)" end if
Clone 64 — 2 occurrences
function _symbolHasTag ( doc_symbol , name )
if len ( doc_symbol . tags ) == 0 then return false end if
for i = 0 to len ( doc_symbol . tags ) - 1
if doc_symbol . tags [ i ] . name == name then return true end if
end for
return false
Clone 65 — 2 occurrences
if len ( doc_symbol . tags ) == 0 then return false end if
for i = 0 to len ( doc_symbol . tags ) - 1
if doc_symbol . tags [ i ] . name == name then return true end if
end for
return false
end function
Clone 66 — 2 occurrences
function _symbolTagKeys ( doc_symbol , name )
result = [ ]
if len ( doc_symbol . tags ) == 0 then return result end if
for i = 0 to len ( doc_symbol . tags ) - 1
if doc_symbol . tags [ i ] . name == name and doc_symbol . tags [ i ] . key != "" then result = result + [ doc_symbol . tags [ i ] . key ] end if
end for
Clone 67 — 2 occurrences
result = [ ]
if len ( doc_symbol . tags ) == 0 then return result end if
for i = 0 to len ( doc_symbol . tags ) - 1
if doc_symbol . tags [ i ] . name == name and doc_symbol . tags [ i ] . key != "" then result = result + [ doc_symbol . tags [ i ] . key ] end if
end for
return result
Clone 68 — 2 occurrences
if len ( doc_symbol . tags ) == 0 then return result end if
for i = 0 to len ( doc_symbol . tags ) - 1
if doc_symbol . tags [ i ] . name == name and doc_symbol . tags [ i ] . key != "" then result = result + [ doc_symbol . tags [ i ] . key ] end if
end for
return result
end function
Clone 69 — 2 occurrences
function _symbolFixtureRole ( doc_symbol )
roles = [ "beforeall" , "afterall" , "beforeeach" , "aftereach" ]
for i = 0 to len ( roles ) - 1
if _symbolHasTag ( doc_symbol , roles [ i ] ) then return "@" + roles [ i ] end if
end for
return ""
Clone 70 — 2 occurrences
roles = [ "beforeall" , "afterall" , "beforeeach" , "aftereach" ]
for i = 0 to len ( roles ) - 1
if _symbolHasTag ( doc_symbol , roles [ i ] ) then return "@" + roles [ i ] end if
end for
return ""
end function
Clone 71 — 2 occurrences
function _symbolById ( project , id )
if len ( project . symbols ) == 0 then return 0 end if
for i = 0 to len ( project . symbols ) - 1
if project . symbols [ i ] . id == id then return project . symbols [ i ] end if
end for
return 0
Clone 72 — 2 occurrences
count = 0
fixture_count = 0
if len ( project . symbols ) > 0 then
for i = 0 to len ( project . symbols ) - 1
if _visible ( project , project . symbols [ i ] ) then
if _symbolHasTag ( project . symbols [ i ] , "testmethod" ) then count = count + 1
Clone 73 — 2 occurrences
fixture_count = 0
if len ( project . symbols ) > 0 then
for i = 0 to len ( project . symbols ) - 1
if _visible ( project , project . symbols [ i ] ) then
if _symbolHasTag ( project . symbols [ i ] , "testmethod" ) then count = count + 1
else if _symbolFixtureRole ( project . symbols [ i ] ) != "" then fixture_count = fixture_count + 1
Clone 74 — 2 occurrences
if len ( project . symbols ) > 0 then
for i = 0 to len ( project . symbols ) - 1
if _visible ( project , project . symbols [ i ] ) then
if _symbolHasTag ( project . symbols [ i ] , "testmethod" ) then count = count + 1
else if _symbolFixtureRole ( project . symbols [ i ] ) != "" then fixture_count = fixture_count + 1
end if
Clone 75 — 2 occurrences
for i = 0 to len ( project . symbols ) - 1
if _visible ( project , project . symbols [ i ] ) then
if _symbolHasTag ( project . symbols [ i ] , "testmethod" ) then count = count + 1
else if _symbolFixtureRole ( project . symbols [ i ] ) != "" then fixture_count = fixture_count + 1
end if
end if
Clone 76 — 2 occurrences
if _visible ( project , project . symbols [ i ] ) then
if _symbolHasTag ( project . symbols [ i ] , "testmethod" ) then count = count + 1
else if _symbolFixtureRole ( project . symbols [ i ] ) != "" then fixture_count = fixture_count + 1
end if
end if
end for
Clone 77 — 2 occurrences
if _symbolHasTag ( project . symbols [ i ] , "testmethod" ) then count = count + 1
else if _symbolFixtureRole ( project . symbols [ i ] ) != "" then fixture_count = fixture_count + 1
end if
end if
end for
end if
Clone 78 — 2 occurrences
if len ( project . symbols ) > 0 then
for i = 0 to len ( project . symbols ) - 1
test_symbol = project . symbols [ i ]
if _visible ( project , test_symbol ) == false or _symbolHasTag ( test_symbol , "testmethod" ) == false then continue end if
categories = _symbolTagKeys ( test_symbol , "category" )
covers = _symbolTagKeys ( test_symbol , "covers" )
Clone 79 — 2 occurrences
for i = 0 to len ( project . symbols ) - 1
test_symbol = project . symbols [ i ]
if _visible ( project , test_symbol ) == false or _symbolHasTag ( test_symbol , "testmethod" ) == false then continue end if
categories = _symbolTagKeys ( test_symbol , "category" )
covers = _symbolTagKeys ( test_symbol , "covers" )
state = "enabled"
Clone 80 — 2 occurrences
test_symbol = project . symbols [ i ]
if _visible ( project , test_symbol ) == false or _symbolHasTag ( test_symbol , "testmethod" ) == false then continue end if
categories = _symbolTagKeys ( test_symbol , "category" )
covers = _symbolTagKeys ( test_symbol , "covers" )
state = "enabled"
if _symbolHasTag ( test_symbol , "skip" ) then state = "skipped" end if
Clone 81 — 2 occurrences
if _visible ( project , test_symbol ) == false or _symbolHasTag ( test_symbol , "testmethod" ) == false then continue end if
categories = _symbolTagKeys ( test_symbol , "category" )
covers = _symbolTagKeys ( test_symbol , "covers" )
state = "enabled"
if _symbolHasTag ( test_symbol , "skip" ) then state = "skipped" end if
package_name = test_symbol . package_name
Clone 82 — 2 occurrences
categories = _symbolTagKeys ( test_symbol , "category" )
covers = _symbolTagKeys ( test_symbol , "covers" )
state = "enabled"
if _symbolHasTag ( test_symbol , "skip" ) then state = "skipped" end if
package_name = test_symbol . package_name
if package_name == "" then package_name = "(global)" end if
Clone 83 — 2 occurrences
if len ( project . symbols ) > 0 then
for i = 0 to len ( project . symbols ) - 1
fixture_symbol = project . symbols [ i ]
fixture_role = _symbolFixtureRole ( fixture_symbol )
if _visible ( project , fixture_symbol ) == false or fixture_role == "" then continue end if
fixture_package = fixture_symbol . package_name
Clone 84 — 2 occurrences
for i = 0 to len ( project . symbols ) - 1
fixture_symbol = project . symbols [ i ]
fixture_role = _symbolFixtureRole ( fixture_symbol )
if _visible ( project , fixture_symbol ) == false or fixture_role == "" then continue end if
fixture_package = fixture_symbol . package_name
if fixture_package == "" then fixture_package = "(global)" end if
Clone 85 — 2 occurrences
if len ( project . files ) > 0 then
for i = 0 to len ( project . files ) - 1
file = project . files [ i ]
if _fileVisible ( project , file ) == false then continue end if
actual = file . package_name
if actual == "" then actual = "(global)" end if
Clone 86 — 2 occurrences
function _dependencyReferenceCount ( project , dependency_id )
count = 0
if len ( project . files ) == 0 then return count end if
for i = 0 to len ( project . files ) - 1
file = project . files [ i ]
if util . isProjectSource ( file . path , project . config . entry , project . config . source_roots ) == false then continue end if
Clone 87 — 2 occurrences
count = 0
if len ( project . files ) == 0 then return count end if
for i = 0 to len ( project . files ) - 1
file = project . files [ i ]
if util . isProjectSource ( file . path , project . config . entry , project . config . source_roots ) == false then continue end if
if len ( file . imports ) == 0 then continue end if
Clone 88 — 2 occurrences
if len ( project . files ) == 0 then return count end if
for i = 0 to len ( project . files ) - 1
file = project . files [ i ]
if util . isProjectSource ( file . path , project . config . entry , project . config . source_roots ) == false then continue end if
if len ( file . imports ) == 0 then continue end if
for j = 0 to len ( file . imports ) - 1
Clone 89 — 2 occurrences
for i = 0 to len ( project . files ) - 1
file = project . files [ i ]
if util . isProjectSource ( file . path , project . config . entry , project . config . source_roots ) == false then continue end if
if len ( file . imports ) == 0 then continue end if
for j = 0 to len ( file . imports ) - 1
if file . imports [ j ] . target_file_id == dependency_id then count = count + 1 break end if
Clone 90 — 2 occurrences
file = project . files [ i ]
if util . isProjectSource ( file . path , project . config . entry , project . config . source_roots ) == false then continue end if
if len ( file . imports ) == 0 then continue end if
for j = 0 to len ( file . imports ) - 1
if file . imports [ j ] . target_file_id == dependency_id then count = count + 1 break end if
end for
Clone 91 — 2 occurrences
if util . isProjectSource ( file . path , project . config . entry , project . config . source_roots ) == false then continue end if
if len ( file . imports ) == 0 then continue end if
for j = 0 to len ( file . imports ) - 1
if file . imports [ j ] . target_file_id == dependency_id then count = count + 1 break end if
end for
end for
Clone 92 — 2 occurrences
if len ( file . imports ) == 0 then continue end if
for j = 0 to len ( file . imports ) - 1
if file . imports [ j ] . target_file_id == dependency_id then count = count + 1 break end if
end for
end for
return count
Clone 93 — 2 occurrences
for j = 0 to len ( file . imports ) - 1
if file . imports [ j ] . target_file_id == dependency_id then count = count + 1 break end if
end for
end for
return count
end function
Clone 94 — 2 occurrences
if len ( project . files ) > 0 then
for i = 0 to len ( project . files ) - 1
file = project . files [ i ]
if util . isProjectSource ( file . path , project . config . entry , project . config . source_roots ) then continue end if
package_name = file . package_name
if package_name == "" then package_name = "(global)" end if
Clone 95 — 2 occurrences
function _hasDependencies ( project )
if len ( project . files ) == 0 then return false end if
for i = 0 to len ( project . files ) - 1
if util . isProjectSource ( project . files [ i ] . path , project . config . entry , project . config . source_roots ) == false then return true end if
end for
return false
Clone 96 — 2 occurrences
if len ( project . files ) == 0 then return false end if
for i = 0 to len ( project . files ) - 1
if util . isProjectSource ( project . files [ i ] . path , project . config . entry , project . config . source_roots ) == false then return true end if
end for
return false
end function
Clone 97 — 2 occurrences
if typeof ( generated ) == "error" then return generated end if
end for
end if
if len ( project . files ) > 0 then
for i = 0 to len ( project . files ) - 1
if _fileVisible ( project , project . files [ i ] ) == false then continue end if
Clone 98 — 2 occurrences
if typeof ( generated ) == "error" then return generated end if
end for
end if
if len ( project . symbols ) > 0 then
for i = 0 to len ( project . symbols ) - 1
listed_sym = project . symbols [ i ]
Clone 99 — 2 occurrences
end for
end if
if len ( project . symbols ) > 0 then
for i = 0 to len ( project . symbols ) - 1
listed_sym = project . symbols [ i ]
if _isType ( listed_sym ) and _visible ( project , listed_sym ) then
Clone 100 — 2 occurrences
cleaned = util . removeStaleGenerated ( root , generated )
if typeof ( cleaned ) == "error" then return cleaned end if
manifest_written = util . writeText ( util . joinPath ( root , ".minidoc-output" ) , strings . join ( util . sortedStrings ( generated ) , "\n" ) + "\n" )
if typeof ( manifest_written ) == "error" then return manifest_written end if
return true
end function
Clone 101 — 2 occurrences
function _ownerType ( project , doc_symbol )
current = doc_symbol
while typeof ( current ) == "struct" and current . container_id != ""
parent = _symbolById ( project , current . container_id )
if typeof ( parent ) != "struct" then break end if
if _isType ( parent ) then return parent end if
Clone 102 — 2 occurrences
current = doc_symbol
while typeof ( current ) == "struct" and current . container_id != ""
parent = _symbolById ( project , current . container_id )
if typeof ( parent ) != "struct" then break end if
if _isType ( parent ) then return parent end if
current = parent
Clone 103 — 2 occurrences
packages = _packages ( project )
if len ( packages ) > 0 then
for i = 0 to len ( packages ) - 1
writer . appendString ( "- [" + packages [ i ] + "](" + _packagePage ( packages [ i ] ) + ")\n" )
end for
end if
Clone 104 — 2 occurrences
if len ( packages ) > 0 then
for i = 0 to len ( packages ) - 1
writer . appendString ( "- [" + packages [ i ] + "](" + _packagePage ( packages [ i ] ) + ")\n" )
end for
end if
return writer . toString ( )
Clone 105 — 2 occurrences
for i = 0 to len ( packages ) - 1
writer . appendString ( "- [" + packages [ i ] + "](" + _packagePage ( packages [ i ] ) + ")\n" )
end for
end if
return writer . toString ( )
end function

Definitions

  • Cognitive complexity: decision complexity weighted by nesting; logical and/or operators add one.
  • Cyclomatic complexity: one plus decisions from conditions, loops, switch cases, and logical and/or operators.
  • Documentation coverage: percentage of documented API summaries, parameter contracts, fields, constants, globals, and enum variants. Empty categories report 100% and do not affect the overall ratio.
  • Halstead metrics: operators and operands are counted from MiniLang lexical tokens. Estimated defects are volume divided by 3,000.
  • Maintainability index: normalized 0–100 index based on Halstead volume, cyclomatic complexity, and source lines. Project MI is source-line weighted across files.
  • SLOC: non-empty lines containing MiniLang tokens after conditional preprocessing; comment-only lines are excluded.