microsoft / node-pty
Source Code Overview

Analysis scope, overview of main, test, generated, deployment, build, and other code.

Source Code Analysis Scope
Files includes and excluded from analyses
txt
mk
gitattributes
editorconfig
gyp
npmignore
gypi
npmrc
  • 21 extensions are included in analyses: cc, h, ts, txt, js, py, md, json, mk, bat, sh, gitignore, gitattributes, ps1, editorconfig, yml, gyp, npmignore, html, gypi, npmrc
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (13 files).
    • exclude files with path like ".*/deps/.*" (Dependencies) (172 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (2 files).
    • exclude files with path like ".*/git[-]history[.]txt" (Git history) (1 file).
    • exclude files with path like ".*/git[-][a-zA-Z0-9_]+[.]txt" (Git data exports for sokrates analyses) (0 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (1 file).
Overview of Analyzed Files
Basic stats on analyzed files
Intro
For analysis purposes we separate files in scope into several categories: main, test, generated, deployment and build, and other.

  • The main category contains all manually created source code files that are being used in the production.
  • Files in the main category are used as input for other analyses: logical decomposition, concerns, duplication, file size, unit size, and conditional complexity.
  • Test source code files are used only for testing of the product. These files are normally not deployed to production.
  • Build and deployment source code files are used to configure or support build and deployment process.
  • Generated source code files are automatically generated files that have not been manually changed after generation.
  • While a source code folder may contain a number of files, we are primarily interested in the source code files that are being written and maintained by developers.
  • Files containing binaries, documentation, or third-party libraries, for instance, are excluded from analysis. The exception are third-party libraries that have been changed by developers.

main2427 LOC (69%) 26 files
test676 LOC (19%) 7 files
generated0 LOC (0%) 0 files
build and deployment0 LOC (0%) 0 files
other373 LOC (10%) 16 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
gyp
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 26 files match defined criteria (2,427 lines of code, 100.0% vs. main code):
    • 6 *.cc files (1,204 lines of code)
    • 13 *.ts files (928 lines of code)
    • 3 *.js files (99 lines of code)
    • 1 *.gyp files (92 lines of code)
    • 1 *.yml files (89 lines of code)
    • 2 *.h files (15 lines of code)
  • " *.cc" is biggest, containing 49.61% of code.
  • " *.h" is smallest, containing 0.62% of code.


*.cc1204 LOC (49%) 6 files
*.ts928 LOC (38%) 13 files
*.js99 LOC (4%) 3 files
*.gyp92 LOC (3%) 1 files
*.yml89 LOC (3%) 1 files
*.h15 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 7 files match defined criteria (676 lines of code, 27.9% vs. main code):
    • 6 *.ts files (652 lines of code)
    • 1 *.js files (24 lines of code)
  • " *.ts" is biggest, containing 96.45% of code.
  • " *.js" is smallest, containing 3.55% of code.


*.ts652 LOC (96%) 6 files
*.js24 LOC (3%) 1 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*[.]npmrc".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ee]xamples/.*".
  • 16 files match defined criteria (373 lines of code, 15.4% vs. main code):
    • 3 *.md files (126 lines of code)
    • 4 *.json files (117 lines of code)
    • 6 *.js files (101 lines of code)
    • 1 *.html files (14 lines of code)
    • 1 *.bat files (8 lines of code)
    • 1 *.sh files (7 lines of code)
  • " *.md" is biggest, containing 33.78% of code.
  • " *.sh" is smallest, containing 1.88% of code.


*.md126 LOC (33%) 3 files
*.json117 LOC (31%) 4 files
*.js101 LOC (27%) 6 files
*.html14 LOC (3%) 1 files
*.bat8 LOC (2%) 1 files
*.sh7 LOC (1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.cc files are analyzed with CppAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis
  • *.ts files are analyzed with TypeScriptAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis
  • *.js files are analyzed with JavaScriptAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis
  • *.gyp files are analyzed with PythonAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Basic heuristic dependency analysis
  • *.yml files are analyzed with YamlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.h files are analyzed with CppAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis


2022-01-30 13:37