Code Metrics

Lines of Code

The following repository-wide code line count report is generated automatically during the documentation build using cloc. The report excludes generated outputs and dependency directories to keep the results focused on source and documentation files. Both a language-level summary and a per-file breakdown are produced.

This report is refreshed automatically on every docs build.

Generated with cloc 2.06 in 0.12 seconds.

Lines by language

Language

Files

Blank

Comment

Code

TypeScript

44

1,249

586

10,207

JavaScript

13

747

409

6,551

JSON

8

0

0

6,494

Markdown

19

664

1

1,913

CSS

5

271

4

1,603

Python

2

114

50

500

make

1

20

1

144

Text

1

0

0

6

SVG

1

0

0

5

reStructuredText

1

7

11

2

Lines by file

File

Language

Blank

Comment

Code

.prettierrc.json

JSON

0

0

8

AGENTS.md

Markdown

23

0

81

CHANGELOG.md

Markdown

261

0

552

CODE_OF_CONDUCT.md

Markdown

35

0

88

CONTRIBUTING.md

Markdown

23

0

81

cspell.json

JSON

0

0

61

docs/requirements.txt

Text

0

0

6

docs/source/_generated/coverage-report.md

Markdown

2

1

40

docs/source/_static/css/custom.css

CSS

4

4

26

docs/source/api/index.rst

reStructuredText

7

11

2

docs/source/automated-testing.md

Markdown

10

0

36

docs/source/changelog.md

Markdown

0

0

3

docs/source/code-development.md

Markdown

0

0

3

docs/source/code-metrics.md

Markdown

44

0

85

docs/source/code-of-conduct.md

Markdown

0

0

3

docs/source/complexity_report.js

JavaScript

116

1

962

docs/source/conf.py

Python

83

38

364

docs/source/coverage_report.py

Python

31

12

136

docs/source/detailed-usage.md

Markdown

86

0

308

docs/source/developer-guide.md

Markdown

72

0

189

docs/source/docgen.md

Markdown

10

0

30

docs/source/extension-overview.md

Markdown

60

0

327

docs/source/index.md

Markdown

2

0

21

docs/source/license.md

Markdown

0

0

2

docs/source/security-issues.md

Markdown

0

0

3

eslint.config.mjs

JavaScript

7

37

187

Makefile

make

20

1

144

media/deviceManager.css

CSS

65

0

347

media/deviceManager.js

JavaScript

123

1

1,014

media/loggerPanel.css

CSS

84

0

554

media/loggerPanel.js

JavaScript

207

271

1,634

media/loggerPanel/messaging.js

JavaScript

1

11

130

media/loggerPanel/rendering.js

JavaScript

16

14

84

media/loggerPanel/state.js

JavaScript

19

26

230

media/sftpExplorer.css

CSS

86

0

487

media/sftpExplorer.js

JavaScript

166

26

1,700

media/sidebarView.css

CSS

32

0

189

media/sidebarView.js

JavaScript

42

20

285

package-lock.json

JSON

0

0

5,819

package.json

JSON

0

0

553

README.md

Markdown

30

0

51

resources/terminal.svg

SVG

0

0

5

SECURITY.md

Markdown

6

0

10

src/configuration.ts

TypeScript

41

23

205

src/deviceColor.ts

TypeScript

6

8

17

src/deviceManagerPanel.ts

TypeScript

132

5

1,105

src/deviceTree.ts

TypeScript

16

39

112

src/extension.ts

TypeScript

100

37

697

src/highlights.ts

TypeScript

1

5

7

src/hostEndpoints.ts

TypeScript

6

17

27

src/logPanel/autoSaveManager.ts

TypeScript

13

20

67

src/logPanel/html.ts

TypeScript

4

12

182

src/logPanel/index.ts

TypeScript

1

5

1

src/logPanel/logPanel.ts

TypeScript

55

41

455

src/logPanel/messageParser.ts

TypeScript

7

9

92

src/logPanel/stateStore.ts

TypeScript

9

24

50

src/logPanel/types.ts

TypeScript

6

7

22

src/logSession/authenticationProvider.ts

TypeScript

16

24

106

src/logSession/connectionManager.ts

TypeScript

20

18

196

src/logSession/errors.ts

TypeScript

2

7

12

src/logSession/fingerprintPersistence.ts

TypeScript

11

24

100

src/logSession/hostKeyVerifier.ts

TypeScript

17

22

88

src/logSession/index.ts

TypeScript

1

5

3

src/logSession/logSession.ts

TypeScript

30

21

296

src/logSession/reconnectionController.ts

TypeScript

11

10

46

src/logSession/types.ts

TypeScript

2

7

9

src/passwordManager.ts

TypeScript

40

39

260

src/sftpExplorer.ts

TypeScript

274

37

3,012

src/sidebarView.ts

TypeScript

25

53

191

src/ssh2.d.ts

TypeScript

4

6

35

src/sshCommandRunner.ts

TypeScript

44

27

378

src/sshTerminal.ts

TypeScript

72

34

487

tests/e2e/runTest.js

JavaScript

4

0

30

tests/e2e/suite/extension.test.js

JavaScript

4

1

10

tests/e2e/suite/index.js

JavaScript

7

0

37

tests/e2e/suite/sftpExplorer.test.js

JavaScript

35

1

248

tests/integration/logSession.integration.test.ts

TypeScript

7

0

65

tests/integration/sidebar.integration.test.ts

TypeScript

15

0

150

tests/mocks/ssh.ts

TypeScript

15

0

68

tests/mocks/vscode.ts

TypeScript

44

0

384

tests/unit/configuration.test.ts

TypeScript

13

0

64

tests/unit/deviceManagerPanel.test.ts

TypeScript

42

0

446

tests/unit/extensionPasswordCommands.test.ts

TypeScript

26

0

135

tests/unit/extensionSftpPresetMigration.test.ts

TypeScript

9

0

52

tests/unit/extensionWebBrowserCommands.test.ts

TypeScript

18

0

69

tests/unit/loggerPanelMessaging.test.ts

TypeScript

9

0

42

tests/unit/logPanel.test.ts

TypeScript

32

0

143

tests/unit/logSession.test.ts

TypeScript

25

0

188

tests/unit/passwordManager.test.ts

TypeScript

15

0

54

tests/unit/sshCommandRunner.test.ts

TypeScript

12

0

66

tsconfig.eslint.json

JSON

0

0

9

tsconfig.json

JSON

0

0

16

tsconfig.vitest.json

JSON

0

0

8

typedoc.json

JSON

0

0

20

vitest.config.ts

TypeScript

1

0

23


Code Complexity

Complexity metrics are generated during the documentation build using a TypeScript and JavaScript parser. The report covers .ts and .js files under the repository (excluding build outputs) and includes:

  • Cyclomatic complexity (decision points and boolean operators)

  • Halstead complexity measures (volume, difficulty, effort, bugs, time)

  • Maintainability index (standard formula using LOC, Halstead volume, and cyclomatic complexity which translates to time for developer onboarding and for code reviews)

  • Cognitive complexity (nesting-aware approximation)

  • Depth of inheritance (in-repo inheritance depth)

  • Coupling between objects (unique type references and new expressions per class)

Why bother? These metrics help you:

  • Catch potential bugs early

  • Make code easier to understand and maintain

  • Save time and money long-term

Here’s a quick comparison:

Metric

Measures

Why It Matters

Cyclomatic Complexity

Code paths

Higher = harder to test

LOC

Code size

Bigger isn’t always better

Maintainability Index

Ease of maintenance

Higher = easier to work with

Cognitive Complexity

Mental effort to understand

Lower = more readable

Benefits of Tracking Code Complexity

Tracking complexity offers key advantages:

Improved Software Quality

Teams can:

  • Spot potential bug hotspots

  • Cut error risk

  • Boost code readability

Cost-Effective Maintenance

Complex code often means:

  • Longer debugging

  • Tough updates

  • Hard onboarding

Tracking helps teams:

  • Find refactoring targets

  • Streamline maintenance

  • Cut long-term costs

Better Resource Allocation

Complexity metrics guide teams in:

  • Prioritizing refactoring

  • Allocating testing resources

  • Planning code reviews

Enhanced Team Collaboration

Complexity metrics provide:

  • A shared language for code quality

  • Objective measures for reviews

  • Clear improvement goals

Proactive Risk Management

Teams can:

  • Prevent technical debt buildup

  • Catch security issues early

  • Address scalability problems

A study of 12,000+ projects found quality issues caused over 20% of failures. Tracking complexity helps avoid these pitfalls.

Quantifiable Quality Standards

Teams can:

  • Set clear benchmarks

  • Measure progress

  • Compare solutions objectively


Code Complexity Report

Thresholds

Metric

Ideal Range

Action if Exceeded

Cyclomatic complexity (function)

< 10

Break down complex functions

LOC (function)

< 100

Modularize large functions

Depth of inheritance (class)

< 5

Simplify class hierarchies

Coupling between objects (class)

< 5

Reduce class dependencies

Maintainability Index

> 65

Improve the above metrics

Complexity overview

Metric

Count

Average

Max

Cyclomatic complexity (functions)

1,455

2.41

47

Cognitive complexity (functions)

1,455

1.63

82

Maintainability index (files)

54

27.6

74.0

Depth of inheritance (classes)

24

1.29

2

Coupling between objects (classes)

24

8.96

36

Halstead summary

Metric

Value

Operators (distinct)

106

Operators (total)

27,987

Operands (distinct)

3,165

Operands (total)

15,918

Vocabulary

3,271

Length

43,905

Volume

512,613.53

Difficulty

266.56

Effort

136,640,902.58

Bugs

170.87

Time (sec)

7,591,161.25

Complexity by file

File

LOC

Functions

Cyclomatic Avg

Cyclomatic Max

Cognitive Avg

Cognitive Max

Maintainability

media/deviceManager.js

1,015

97

2.64

29

1.77

28

0.0

media/loggerPanel.js

1,905

164

2.73

19

1.92

29

0.0

media/loggerPanel/messaging.js

141

2

23.00

45

31.50

63

20.6

media/loggerPanel/rendering.js

98

6

4.50

14

5.00

22

33.2

media/loggerPanel/state.js

256

13

4.15

29

3.23

28

11.9

media/sftpExplorer.js

1,726

180

2.94

31

2.16

37

0.0

media/sidebarView.js

305

33

1.64

7

0.67

7

13.9

src/configuration.ts

228

22

3.05

12

2.45

15

11.4

src/deviceColor.ts

25

3

1.33

2

0.33

1

50.8

src/deviceManagerPanel.ts

1,110

72

2.92

24

2.06

23

0.0

src/deviceTree.ts

151

12

1.58

5

0.58

4

24.2

src/extension.ts

734

54

3.33

24

2.76

31

0.0

src/highlights.ts

12

0

0.00

0

0.00

0

62.6

src/hostEndpoints.ts

44

1

3.00

3

2.00

2

43.4

src/logPanel/autoSaveManager.ts

87

10

2.20

5

1.40

6

32.5

src/logPanel/html.ts

194

2

1.50

2

0.50

1

20.9

src/logPanel/index.ts

6

0

0.00

0

0.00

0

74.0

src/logPanel/logPanel.ts

496

43

2.09

14

1.23

14

3.7

src/logPanel/messageParser.ts

101

6

5.83

20

5.83

25

26.5

src/logPanel/stateStore.ts

74

10

1.10

2

0.10

1

33.7

src/logPanel/types.ts

29

0

0.00

0

0.00

0

49.3

src/logSession/authenticationProvider.ts

130

8

2.88

4

2.00

4

25.9

src/logSession/connectionManager.ts

214

19

1.79

4

0.79

3

19.4

src/logSession/errors.ts

19

1

1.00

1

0.00

0

55.1

src/logSession/fingerprintPersistence.ts

124

7

4.00

7

3.29

6

25.2

src/logSession/hostKeyVerifier.ts

110

8

2.50

9

1.88

11

28.1

src/logSession/index.ts

8

0

0.00

0

0.00

0

67.0

src/logSession/logSession.ts

317

28

2.46

12

1.57

14

10.9

src/logSession/reconnectionController.ts

56

2

5.00

9

8.00

16

38.1

src/logSession/types.ts

16

0

0.00

0

0.00

0

55.6

src/passwordManager.ts

299

21

2.33

14

1.52

17

16.0

src/sftpExplorer.ts

3,049

191

3.04

47

2.55

82

0.0

src/sidebarView.ts

244

12

2.08

10

1.17

10

17.6

src/sshCommandRunner.ts

405

36

2.56

12

1.81

14

2.7

src/sshTerminal.ts

521

43

2.91

18

2.16

22

0.0

tests/e2e/runTest.js

30

5

1.60

2

0.60

1

45.1

tests/e2e/suite/extension.test.js

11

2

1.00

1

0.00

0

58.9

tests/e2e/suite/index.js

37

6

1.67

4

0.67

3

42.4

tests/e2e/suite/sftpExplorer.test.js

249

42

1.29

3

0.31

3

17.4

tests/integration/logSession.integration.test.ts

65

15

1.00

1

0.00

0

35.6

tests/integration/sidebar.integration.test.ts

150

37

1.05

2

0.05

1

20.5

tests/mocks/ssh.ts

68

12

1.25

3

0.25

2

33.2

tests/mocks/vscode.ts

384

80

1.13

3

0.13

2

0.9

tests/unit/configuration.test.ts

64

5

1.00

1

0.00

0

36.3

tests/unit/deviceManagerPanel.test.ts

446

28

1.18

2

0.18

1

8.2

tests/unit/extensionPasswordCommands.test.ts

135

16

1.13

2

0.13

1

29.3

tests/unit/extensionSftpPresetMigration.test.ts

52

5

1.00

1

0.00

0

39.0

tests/unit/extensionWebBrowserCommands.test.ts

69

8

1.13

2

0.13

1

37.5

tests/unit/loggerPanelMessaging.test.ts

42

6

1.33

2

0.33

1

40.6

tests/unit/logPanel.test.ts

143

22

1.00

1

0.00

0

22.7

tests/unit/logSession.test.ts

188

40

1.00

1

0.00

0

23.5

tests/unit/passwordManager.test.ts

54

7

1.00

1

0.00

0

37.7

tests/unit/sshCommandRunner.test.ts

66

13

1.23

4

0.23

3

33.4

vitest.config.ts

23

0

0.00

0

0.00

0

51.8

Halstead metrics by file

File

Vocabulary

Length

Volume

Difficulty

Effort

Bugs

Time (sec)

media/deviceManager.js

347

3,164

26,700.34

71.43

1,907,308.46

8.90

105,961.58

media/loggerPanel.js

413

2,487

21,612.02

53.83

1,163,379.38

7.20

64,632.19

media/loggerPanel/messaging.js

126

827

5,770.21

46.04

265,667.63

1.92

14,759.31

media/loggerPanel/rendering.js

43

122

662.00

16.56

10,962.79

0.22

609.04

media/loggerPanel/state.js

195

1,431

10,886.09

56.14

611,147.73

3.63

33,952.65

media/sftpExplorer.js

283

1,109

9,032.43

27.00

243,893.28

3.01

13,549.63

media/sidebarView.js

120

479

3,308.40

22.45

74,270.22

1.10

4,126.12

src/configuration.ts

171

1,422

10,548.19

89.97

948,990.92

3.52

52,721.72

src/deviceColor.ts

40

74

393.82

14.00

5,513.52

0.13

306.31

src/deviceManagerPanel.ts

483

2,788

24,857.47

75.02

1,864,717.88

8.29

103,595.44

src/deviceTree.ts

142

654

4,675.93

50.81

237,577.27

1.56

13,198.74

src/extension.ts

203

866

6,638.18

59.64

395,904.58

2.21

21,994.70

src/highlights.ts

14

25

95.18

4.00

380.74

0.03

21.15

src/hostEndpoints.ts

44

149

813.46

28.80

23,427.51

0.27

1,301.53

src/logPanel/autoSaveManager.ts

76

243

1,518.25

33.72

51,194.53

0.51

2,844.14

src/logPanel/html.ts

260

1,598

12,819.74

52.19

669,048.18

4.27

37,169.34

src/logPanel/index.ts

7

7

19.65

2.50

49.13

0.01

2.73

src/logPanel/logPanel.ts

169

578

4,277.71

36.59

156,517.70

1.43

8,695.43

src/logPanel/messageParser.ts

83

590

3,761.27

70.02

263,374.61

1.25

14,631.92

src/logPanel/stateStore.ts

81

426

2,700.78

61.86

167,071.27

0.90

9,281.74

src/logPanel/types.ts

33

96

484.26

8.84

4,281.89

0.16

237.88

src/logSession/authenticationProvider.ts

105

542

3,639.12

56.92

207,149.97

1.21

11,508.33

src/logSession/connectionManager.ts

135

554

3,920.56

42.86

168,032.57

1.31

9,335.14

src/logSession/errors.ts

31

52

257.62

11.08

2,855.27

0.09

158.63

src/logSession/fingerprintPersistence.ts

104

621

4,160.97

77.37

321,920.62

1.39

17,884.48

src/logSession/hostKeyVerifier.ts

116

481

3,298.69

45.41

149,778.30

1.10

8,321.02

src/logSession/index.ts

11

23

79.57

3.60

286.44

0.03

15.91

src/logSession/logSession.ts

147

554

3,988.62

32.80

130,812.57

1.33

7,267.36

src/logSession/reconnectionController.ts

74

260

1,614.46

63.54

102,577.87

0.54

5,698.77

src/logSession/types.ts

30

80

392.55

8.50

3,336.69

0.13

185.37

src/passwordManager.ts

100

326

2,165.90

25.47

55,171.84

0.72

3,065.10

src/sftpExplorer.ts

791

7,216

69,472.28

124.70

8,663,327.48

23.16

481,295.97

src/sidebarView.ts

178

954

7,131.85

47.87

341,384.86

2.38

18,965.83

src/sshCommandRunner.ts

218

1,304

10,129.71

97.48

987,447.03

3.38

54,858.17

src/sshTerminal.ts

180

597

4,472.64

41.67

186,359.85

1.49

10,353.32

tests/e2e/runTest.js

61

203

1,203.94

19.07

22,954.06

0.40

1,275.23

tests/e2e/suite/extension.test.js

30

78

382.74

9.19

3,516.40

0.13

195.36

tests/e2e/suite/index.js

67

229

1,389.13

18.09

25,127.90

0.46

1,395.99

tests/e2e/suite/sftpExplorer.test.js

74

318

1,974.61

25.56

50,478.50

0.66

2,804.36

tests/integration/logSession.integration.test.ts

82

287

1,824.62

16.76

30,585.54

0.61

1,699.20

tests/integration/sidebar.integration.test.ts

142

933

6,670.71

39.21

261,534.83

2.22

14,529.71

tests/mocks/ssh.ts

96

525

3,457.11

53.40

184,597.50

1.15

10,255.42

tests/mocks/vscode.ts

289

2,931

23,960.71

109.83

2,631,526.70

7.99

146,195.93

tests/unit/configuration.test.ts

69

382

2,333.46

23.75

55,419.59

0.78

3,078.87

tests/unit/deviceManagerPanel.test.ts

271

2,089

16,883.61

53.44

902,240.14

5.63

50,124.45

tests/unit/extensionPasswordCommands.test.ts

73

207

1,281.29

14.91

19,098.53

0.43

1,061.03

tests/unit/extensionSftpPresetMigration.test.ts

69

302

1,844.77

17.48

32,246.66

0.61

1,791.48

tests/unit/extensionWebBrowserCommands.test.ts

75

169

1,052.67

17.57

18,500.12

0.35

1,027.78

tests/unit/loggerPanelMessaging.test.ts

71

303

1,863.37

27.00

50,311.08

0.62

2,795.06

tests/unit/logPanel.test.ts

152

1,097

7,950.98

40.82

324,556.25

2.65

18,030.90

tests/unit/logSession.test.ts

66

194

1,172.61

12.73

14,932.10

0.39

829.56

tests/unit/passwordManager.test.ts

76

374

2,336.72

18.15

42,417.50

0.78

2,356.53

tests/unit/sshCommandRunner.test.ts

107

503

3,390.96

27.65

93,744.96

1.13

5,208.05

vitest.config.ts

40

82

436.40

6.98

3,046.71

0.15

169.26

Class coupling and inheritance by file

Class

File

DIT

CBO

DeviceManagerPanel

src/deviceManagerPanel.ts

1

22

DeviceItem

src/deviceTree.ts

2

2

DeviceTreeDataProvider

src/deviceTree.ts

1

10

GroupItem

src/deviceTree.ts

2

2

AutoSaveManager

src/logPanel/autoSaveManager.ts

1

2

LogPanel

src/logPanel/logPanel.ts

1

17

WorkspaceStateStore

src/logPanel/stateStore.ts

1

5

AuthenticationProvider

src/logSession/authenticationProvider.ts

1

9

ConnectionManager

src/logSession/connectionManager.ts

1

12

HostKeyMismatchError

src/logSession/errors.ts

2

2

FingerprintPersistence

src/logSession/fingerprintPersistence.ts

1

6

HostKeyVerifier

src/logSession/hostKeyVerifier.ts

1

4

LogSession

src/logSession/logSession.ts

1

21

ReconnectionController

src/logSession/reconnectionController.ts

1

3

PasswordManager

src/passwordManager.ts

1

6

HostKeyMismatchError

src/sftpExplorer.ts

2

1

SftpExplorerPanel

src/sftpExplorer.ts

1

36

SidebarViewProvider

src/sidebarView.ts

1

9

SshCommandError

src/sshCommandRunner.ts

2

1

SshCommandRunner

src/sshCommandRunner.ts

1

17

SshTerminalSession

src/sshTerminal.ts

1

19

MockSshChannel

tests/mocks/ssh.ts

2

1

MockSshClient

tests/mocks/ssh.ts

2

7

MockLogSession

tests/unit/logPanel.test.ts

1

1

Complexity by function (outside thresholds)

Function

Class

Location

LOC

Cyclomatic

Cognitive

toViewDevice

media/deviceManager.js:83

40

29

28

renderSshCommandsEditor

media/deviceManager.js:361

102

3

2

createInput

media/deviceManager.js:597

112

16

15

<anonymous>

media/loggerPanel.js:26

1,882

10

9

handleLogLine

media/loggerPanel.js:616

53

19

29

handleBookmarkAction

media/loggerPanel.js:1107

34

11

12

renderStatusText

media/loggerPanel.js:1337

48

14

20

registerMessageHandlers

media/loggerPanel/messaging.js:10

133

1

0

<anonymous>

media/loggerPanel/messaging.js:20

122

45

63

buildHighlightedContent

media/loggerPanel/rendering.js:51

53

14

22

createStateController

media/loggerPanel/state.js:55

207

1

0

restoreStateFromSnapshot

media/loggerPanel/state.js:170

75

29

28

<anonymous>

media/sftpExplorer.js:7

1,721

2

1

handleTestCommand

media/sftpExplorer.js:344

34

12

13

selectNextQuickSearchMatch

media/sftpExplorer.js:486

35

10

10

handleEntryClick

media/sftpExplorer.js:682

36

12

15

updateContextMenuOptions

media/sftpExplorer.js:773

36

11

10

buildModeFromDialog

media/sftpExplorer.js:923

13

10

9

handleListResponse

media/sftpExplorer.js:1172

25

10

12

deleteSelected

media/sftpExplorer.js:1381

33

13

13

<anonymous>

media/sftpExplorer.js:1605

79

31

37

<anonymous>

media/sftpExplorer.js:1723

38

11

11

<anonymous>

media/sftpExplorer.js:1844

46

16

23

<anonymous>

media/sidebarView.js:7

300

1

0

createDeviceCard

media/sidebarView.js:112

125

6

5

normalizeSshCommands

src/configuration.ts:46

23

11

15

applyDeviceDefaults

src/configuration.ts:149

31

12

11

buildHtml

DeviceManagerPanel

src/deviceManagerPanel.ts:195

206

1

0

normalizeDevice

DeviceManagerPanel

src/deviceManagerPanel.ts:805

54

24

23

buildBastion

DeviceManagerPanel

src/deviceManagerPanel.ts:1147

22

14

13

migrateLegacyPasswords

src/extension.ts:69

139

24

31

<anonymous>

src/extension.ts:246

42

10

9

activate

src/extension.ts:331

433

2

1

buildLogPanelHtml

src/logPanel/html.ts:14

172

1

0

handleWebviewMessage

LogPanel

src/logPanel/logPanel.ts:159

43

14

14

parseWebviewMessage

src/logPanel/messageParser.ts:26

48

20

25

validateDeviceConfiguration

LogSession

src/logSession/logSession.ts:179

29

12

14

tryReuseStoredSecret

PasswordManager

src/passwordManager.ts:174

64

14

17

handleTestMessage

SftpExplorerPanel

src/sftpExplorer.ts:468

31

17

17

handleMessage

SftpExplorerPanel

src/sftpExplorer.ts:500

248

47

82

copyEntry

SftpExplorerPanel

src/sftpExplorer.ts:1147

57

16

20

applyPermissions

SftpExplorerPanel

src/sftpExplorer.ts:1696

44

10

12

createSftpConnection

SftpExplorerPanel

src/sftpExplorer.ts:2245

66

15

22

validateDeviceConfiguration

SftpExplorerPanel

src/sftpExplorer.ts:2321

29

12

14

getHtml

SftpExplorerPanel

src/sftpExplorer.ts:2714

564

2

1

<anonymous>

src/sidebarView.ts:123

36

10

10

run

SshCommandRunner

src/sshCommandRunner.ts:88

47

11

13

validateDeviceConfiguration

SshCommandRunner

src/sshCommandRunner.ts:144

29

12

14

start

SshTerminalSession

src/sshTerminal.ts:132

73

18

22

validateDeviceConfiguration

SshTerminalSession

src/sshTerminal.ts:221

29

12

14

<anonymous>

tests/e2e/suite/sftpExplorer.test.js:6

246

1

0

<anonymous>

tests/integration/sidebar.integration.test.ts:23

131

1

0

<anonymous>

tests/unit/deviceManagerPanel.test.ts:47

406

1

0

<anonymous>

tests/unit/logSession.test.ts:46

150

1

0

Halstead metrics by function (outside thresholds)

Function

Class

Location

Vocabulary

Length

Volume

Difficulty

Effort

Bugs

Time (sec)

toViewDevice

media/deviceManager.js:83

59

333

1,958.92

30.56

59,863.67

0.65

3,325.76

renderSshCommandsEditor

media/deviceManager.js:361

99

574

3,805.25

35.26

134,160.12

1.27

7,453.34

createInput

media/deviceManager.js:597

103

826

5,523.05

44.96

248,327.49

1.84

13,795.97

<anonymous>

media/loggerPanel.js:26

405

2,447

21,195.37

51.34

1,088,222.61

7.07

60,456.81

handleLogLine

media/loggerPanel.js:616

69

392

2,394.54

30.63

73,332.84

0.80

4,074.05

handleBookmarkAction

media/loggerPanel.js:1107

44

133

726.10

16.89

12,264.85

0.24

681.38

renderStatusText

media/loggerPanel.js:1337

63

266

1,589.96

34.88

55,449.73

0.53

3,080.54

registerMessageHandlers

media/loggerPanel/messaging.js:10

126

827

5,770.21

46.04

265,667.63

1.92

14,759.31

<anonymous>

media/loggerPanel/messaging.js:20

120

800

5,525.51

43.40

239,825.07

1.84

13,323.61

buildHighlightedContent

media/loggerPanel/rendering.js:51

67

296

1,795.56

44.59

80,072.38

0.60

4,448.47

createStateController

media/loggerPanel/state.js:55

138

1,214

8,629.75

73.15

631,302.41

2.88

35,072.36

restoreStateFromSnapshot

media/loggerPanel/state.js:170

94

613

4,017.96

49.09

197,258.69

1.34

10,958.82

<anonymous>

media/sftpExplorer.js:7

283

1,108

9,024.28

27.00

243,673.36

3.01

13,537.41

handleTestCommand

media/sftpExplorer.js:344

49

133

746.76

16.70

12,473.60

0.25

692.98

selectNextQuickSearchMatch

media/sftpExplorer.js:486

63

251

1,500.30

37.53

56,305.27

0.50

3,128.07

handleEntryClick

media/sftpExplorer.js:682

72

275

1,696.73

28.54

48,430.56

0.57

2,690.59

updateContextMenuOptions

media/sftpExplorer.js:773

61

258

1,530.13

31.78

48,633.33

0.51

2,701.85

buildModeFromDialog

media/sftpExplorer.js:923

36

122

630.73

16.39

10,338.50

0.21

574.36

handleListResponse

media/sftpExplorer.js:1172

51

209

1,185.54

26.60

31,535.28

0.40

1,751.96

deleteSelected

media/sftpExplorer.js:1381

48

113

631.10

19.46

12,282.19

0.21

682.34

<anonymous>

media/sftpExplorer.js:1605

63

388

2,319.18

27.21

63,103.40

0.77

3,505.74

<anonymous>

media/sftpExplorer.js:1723

57

209

1,219.07

24.51

29,884.73

0.41

1,660.26

<anonymous>

media/sftpExplorer.js:1844

65

239

1,439.35

25.31

36,433.44

0.48

2,024.08

<anonymous>

media/sidebarView.js:7

120

478

3,301.49

22.45

74,115.16

1.10

4,117.51

createDeviceCard

media/sidebarView.js:112

90

372

2,414.97

18.38

44,383.22

0.80

2,465.73

normalizeSshCommands

src/configuration.ts:46

47

160

888.73

39.47

35,080.31

0.30

1,948.91

applyDeviceDefaults

src/configuration.ts:149

52

223

1,271.20

28.79

36,598.20

0.42

2,033.23

buildHtml

DeviceManagerPanel

src/deviceManagerPanel.ts:195

248

1,417

11,271.10

36.04

406,218.47

3.76

22,567.69

normalizeDevice

DeviceManagerPanel

src/deviceManagerPanel.ts:805

61

431

2,556.15

37.56

96,011.40

0.85

5,333.97

buildBastion

DeviceManagerPanel

src/deviceManagerPanel.ts:1147

44

146

797.08

21.67

17,270.00

0.27

959.44

migrateLegacyPasswords

src/extension.ts:69

82

364

2,314.15

50.56

117,003.37

0.77

6,500.19

<anonymous>

src/extension.ts:246

58

287

1,681.24

39.00

65,568.38

0.56

3,642.69

activate

src/extension.ts:331

122

365

2,529.72

33.49

84,716.18

0.84

4,706.45

buildLogPanelHtml

src/logPanel/html.ts:14

254

1,584

12,654.08

46.36

586,655.47

4.22

32,591.97

handleWebviewMessage

LogPanel

src/logPanel/logPanel.ts:159

59

203

1,194.18

22.06

26,344.26

0.40

1,463.57

parseWebviewMessage

src/logPanel/messageParser.ts:26

58

263

1,540.65

43.08

66,366.42

0.51

3,687.02

validateDeviceConfiguration

LogSession

src/logSession/logSession.ts:179

41

208

1,114.37

38.85

43,293.31

0.37

2,405.18

tryReuseStoredSecret

PasswordManager

src/passwordManager.ts:174

56

131

760.76

23.28

17,707.43

0.25

983.75

handleTestMessage

SftpExplorerPanel

src/sftpExplorer.ts:468

49

148

830.98

12.75

10,594.96

0.28

588.61

handleMessage

SftpExplorerPanel

src/sftpExplorer.ts:500

117

1,055

7,248.23

71.55

518,628.05

2.42

28,812.67

copyEntry

SftpExplorerPanel

src/sftpExplorer.ts:1147

66

458

2,768.33

58.95

163,185.92

0.92

9,065.88

applyPermissions

SftpExplorerPanel

src/sftpExplorer.ts:1696

62

287

1,708.85

40.78

69,689.22

0.57

3,871.62

createSftpConnection

SftpExplorerPanel

src/sftpExplorer.ts:2245

76

240

1,499.50

28.37

42,540.24

0.50

2,363.35

validateDeviceConfiguration

SftpExplorerPanel

src/sftpExplorer.ts:2321

40

210

1,117.60

41.45

46,321.78

0.37

2,573.43

getHtml

SftpExplorerPanel

src/sftpExplorer.ts:2714

338

3,204

26,916.42

51.80

1,394,202.29

8.97

77,455.68

<anonymous>

src/sidebarView.ts:123

42

157

846.59

13.50

11,429.02

0.28

634.95

run

SshCommandRunner

src/sshCommandRunner.ts:88

77

265

1,660.70

41.63

69,126.57

0.55

3,840.37

validateDeviceConfiguration

SshCommandRunner

src/sshCommandRunner.ts:144

40

210

1,117.60

41.45

46,321.78

0.37

2,573.43

start

SshTerminalSession

src/sshTerminal.ts:132

90

367

2,382.51

47.60

113,407.48

0.79

6,300.42

validateDeviceConfiguration

SshTerminalSession

src/sshTerminal.ts:221

40

210

1,117.60

41.45

46,321.78

0.37

2,573.43

<anonymous>

tests/e2e/suite/sftpExplorer.test.js:6

67

298

1,807.69

25.00

45,192.36

0.60

2,510.69

<anonymous>

tests/integration/sidebar.integration.test.ts:23

120

794

5,484.07

35.05

192,243.81

1.83

10,680.21

<anonymous>

tests/unit/deviceManagerPanel.test.ts:47

246

1,893

15,035.18

53.22

800,146.87

5.01

44,452.60

<anonymous>

tests/unit/logSession.test.ts:46

82

300

1,907.27

22.29

42,504.78

0.64

2,361.38

Class coupling and inheritance by function (outside thresholds)

Function

Class

Location

DIT

CBO

toViewDevice

media/deviceManager.js:83

1

0

renderSshCommandsEditor

media/deviceManager.js:361

1

0

createInput

media/deviceManager.js:597

1

0

<anonymous>

media/loggerPanel.js:26

1

0

handleLogLine

media/loggerPanel.js:616

1

0

handleBookmarkAction

media/loggerPanel.js:1107

1

0

renderStatusText

media/loggerPanel.js:1337

1

0

registerMessageHandlers

media/loggerPanel/messaging.js:10

1

0

<anonymous>

media/loggerPanel/messaging.js:20

1

0

buildHighlightedContent

media/loggerPanel/rendering.js:51

1

0

createStateController

media/loggerPanel/state.js:55

1

0

restoreStateFromSnapshot

media/loggerPanel/state.js:170

1

0

<anonymous>

media/sftpExplorer.js:7

1

0

handleTestCommand

media/sftpExplorer.js:344

1

0

selectNextQuickSearchMatch

media/sftpExplorer.js:486

1

0

handleEntryClick

media/sftpExplorer.js:682

1

0

updateContextMenuOptions

media/sftpExplorer.js:773

1

0

buildModeFromDialog

media/sftpExplorer.js:923

1

0

handleListResponse

media/sftpExplorer.js:1172

1

0

deleteSelected

media/sftpExplorer.js:1381

1

0

<anonymous>

media/sftpExplorer.js:1605

1

0

<anonymous>

media/sftpExplorer.js:1723

1

0

<anonymous>

media/sftpExplorer.js:1844

1

0

<anonymous>

media/sidebarView.js:7

1

0

createDeviceCard

media/sidebarView.js:112

1

0

normalizeSshCommands

src/configuration.ts:46

1

0

applyDeviceDefaults

src/configuration.ts:149

1

0

buildHtml

DeviceManagerPanel

src/deviceManagerPanel.ts:195

1

22

normalizeDevice

DeviceManagerPanel

src/deviceManagerPanel.ts:805

1

22

buildBastion

DeviceManagerPanel

src/deviceManagerPanel.ts:1147

1

22

migrateLegacyPasswords

src/extension.ts:69

1

0

<anonymous>

src/extension.ts:246

1

0

activate

src/extension.ts:331

1

0

buildLogPanelHtml

src/logPanel/html.ts:14

1

0

handleWebviewMessage

LogPanel

src/logPanel/logPanel.ts:159

1

17

parseWebviewMessage

src/logPanel/messageParser.ts:26

1

0

validateDeviceConfiguration

LogSession

src/logSession/logSession.ts:179

1

21

tryReuseStoredSecret

PasswordManager

src/passwordManager.ts:174

1

6

handleTestMessage

SftpExplorerPanel

src/sftpExplorer.ts:468

1

36

handleMessage

SftpExplorerPanel

src/sftpExplorer.ts:500

1

36

copyEntry

SftpExplorerPanel

src/sftpExplorer.ts:1147

1

36

applyPermissions

SftpExplorerPanel

src/sftpExplorer.ts:1696

1

36

createSftpConnection

SftpExplorerPanel

src/sftpExplorer.ts:2245

1

36

validateDeviceConfiguration

SftpExplorerPanel

src/sftpExplorer.ts:2321

1

36

getHtml

SftpExplorerPanel

src/sftpExplorer.ts:2714

1

36

<anonymous>

src/sidebarView.ts:123

1

0

run

SshCommandRunner

src/sshCommandRunner.ts:88

1

17

validateDeviceConfiguration

SshCommandRunner

src/sshCommandRunner.ts:144

1

17

start

SshTerminalSession

src/sshTerminal.ts:132

1

19

validateDeviceConfiguration

SshTerminalSession

src/sshTerminal.ts:221

1

19

<anonymous>

tests/e2e/suite/sftpExplorer.test.js:6

1

0

<anonymous>

tests/integration/sidebar.integration.test.ts:23

1

0

<anonymous>

tests/unit/deviceManagerPanel.test.ts:47

1

0

<anonymous>

tests/unit/logSession.test.ts:46

1

0

Generated on 2026-04-01T03:21:03.774Z.


Test Coverage

The coverage summary is generated automatically when running the test suite (for example, via npm test or make test) and exported into the documentation metrics.

Overall coverage

Metric

Coverage

Lines

31.2% (964/3091)

Statements

31.3% (977/3124)

Functions

36.1% (220/610)

Branches

24.3% (466/1918)

Coverage by file

File

Lines

Statements

Functions

Branches

src/configuration.ts

66.7% (58/87)

67.0% (59/88)

68.2% (15/22)

59.8% (49/82)

src/deviceColor.ts

60.0% (6/10)

60.0% (6/10)

33.3% (1/3)

50.0% (1/2)

src/deviceManagerPanel.ts

80.3% (236/294)

80.6% (241/299)

94.4% (68/72)

65.7% (161/245)

src/deviceTree.ts

0.0% (0/35)

0.0% (0/39)

0.0% (0/12)

0.0% (0/13)

src/extension.ts

35.4% (138/390)

35.2% (139/395)

33.3% (18/54)

33.6% (72/214)

src/highlights.ts

100.0% (0/0)

100.0% (0/0)

100.0% (0/0)

100.0% (0/0)

src/hostEndpoints.ts

100.0% (8/8)

100.0% (8/8)

100.0% (1/1)

75.0% (3/4)

src/logPanel/autoSaveManager.ts

20.0% (7/35)

18.9% (7/37)

20.0% (2/10)

29.2% (7/24)

src/logPanel/html.ts

100.0% (11/11)

100.0% (12/12)

100.0% (2/2)

100.0% (0/0)

src/logPanel/index.ts

100.0% (0/0)

100.0% (0/0)

100.0% (0/0)

100.0% (0/0)

src/logPanel/logPanel.ts

44.2% (88/199)

44.3% (89/201)

41.9% (18/43)

34.7% (26/75)

src/logPanel/messageParser.ts

23.1% (6/26)

22.2% (6/27)

16.7% (1/6)

13.6% (6/44)

src/logPanel/stateStore.ts

21.1% (4/19)

19.0% (4/21)

20.0% (2/10)

0.0% (0/2)

src/logPanel/types.ts

100.0% (0/0)

100.0% (0/0)

100.0% (0/0)

100.0% (0/0)

src/logSession/authenticationProvider.ts

28.6% (12/42)

28.6% (12/42)

37.5% (3/8)

24.1% (7/29)

src/logSession/connectionManager.ts

32.9% (23/70)

32.9% (23/70)

36.8% (7/19)

16.7% (5/30)

src/logSession/errors.ts

100.0% (5/5)

100.0% (5/5)

100.0% (1/1)

100.0% (0/0)

src/logSession/fingerprintPersistence.ts

64.9% (24/37)

64.9% (24/37)

85.7% (6/7)

36.8% (14/38)

src/logSession/hostKeyVerifier.ts

38.1% (16/42)

38.1% (16/42)

75.0% (6/8)

13.6% (3/22)

src/logSession/index.ts

100.0% (0/0)

100.0% (0/0)

100.0% (0/0)

100.0% (0/0)

src/logSession/logSession.ts

72.7% (93/128)

71.8% (94/131)

71.4% (20/28)

52.7% (39/74)

src/logSession/reconnectionController.ts

79.2% (19/24)

79.2% (19/24)

100.0% (2/2)

66.7% (8/12)

src/logSession/types.ts

100.0% (0/0)

100.0% (0/0)

100.0% (0/0)

100.0% (0/0)

src/passwordManager.ts

81.4% (79/97)

81.4% (79/97)

90.0% (18/20)

53.2% (25/47)

src/sftpExplorer.ts

0.1% (1/1070)

0.1% (1/1074)

0.0% (0/191)

0.0% (0/691)

src/sidebarView.ts

63.0% (34/54)

64.9% (37/57)

83.3% (10/12)

26.7% (4/15)

src/ssh2.d.ts

100.0% (0/0)

100.0% (0/0)

100.0% (0/0)

100.0% (0/0)

src/sshCommandRunner.ts

56.3% (94/167)

56.3% (94/167)

52.8% (19/36)

34.3% (36/105)

src/sshTerminal.ts

0.8% (2/241)

0.8% (2/241)

0.0% (0/43)

0.0% (0/150)

Generated from coverage/coverage-summary.json.