microsoft / BotFramework-Composer
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
npmrc
plist
txt
eslintignore
nsh
dockerignore
editorconfig
prettierignore
  • 21 extensions are included in analyses: ts, tsx, json, js, md, svg, gitignore, yml, css, html, npmrc, plist, txt, eslintignore, nsh, dockerignore, jsx, ps1, sh, editorconfig, prettierignore
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (100 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (13 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (65 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) (0 files).
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.

main117603 LOC (71%) 1397 files
test29882 LOC (18%) 406 files
generated0 LOC (0%) 0 files
build and deployment328 LOC (<1%) 2 files
other15711 LOC (9%) 279 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
nsh
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1397 files match defined criteria (117,603 lines of code, 100.0% vs. main code):
    • 835 *.ts files (61,130 lines of code)
    • 482 *.tsx files (54,205 lines of code)
    • 72 *.js files (2,002 lines of code)
    • 4 *.yml files (110 lines of code)
    • 1 *.css files (43 lines of code)
    • 1 *.ps1 files (41 lines of code)
    • 1 *.html files (38 lines of code)
    • 1 *.nsh files (34 lines of code)
  • " *.ts" is biggest, containing 51.98% of code.
  • " *.nsh" is smallest, containing 0.03% of code.


*.ts61130 LOC (51%) 835 files
*.tsx54205 LOC (46%) 482 files
*.js2002 LOC (1%) 72 files
*.yml110 LOC (<1%) 4 files
*.css43 LOC (<1%) 1 files
*.ps141 LOC (<1%) 1 files
*.html38 LOC (<1%) 1 files
*.nsh34 LOC (<1%) 1 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]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*__tests__.*".
    • files with paths like ".*/__mocks?__/.*".
    • files with paths like ".*__test__.*".
    • files with paths like ".*[-]tests/.*".
    • files with paths like ".*[.]spec[.]ts".
    • files with any line of content like ".*/simpletest/.*".
  • 406 files match defined criteria (29,882 lines of code, 25.4% vs. main code):
    • 213 *.ts files (16,594 lines of code)
    • 187 *.tsx files (13,168 lines of code)
    • 4 *.js files (93 lines of code)
    • 1 *.jsx files (16 lines of code)
    • 1 *.sh files (11 lines of code)
  • " *.ts" is biggest, containing 55.53% of code.
  • " *.sh" is smallest, containing 0.04% of code.


*.ts16594 LOC (55%) 213 files
*.tsx13168 LOC (44%) 187 files
*.js93 LOC (<1%) 4 files
*.jsx16 LOC (<1%) 1 files
*.sh11 LOC (<1%) 1 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/docker[-]compose[.]yml".
  • 2 files match defined criteria (328 lines of code, 0.3% vs. main code):
    • 1 *.js files (310 lines of code)
    • 1 *.yml files (18 lines of code)
  • " *.js" is biggest, containing 94.51% of code.
  • " *.yml" is smallest, containing 5.49% of code.


*.js310 LOC (94%) 1 files
*.yml18 LOC (5%) 1 files
Other Code
plist
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]npmrc".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]plist".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
  • 279 files match defined criteria (15,711 lines of code, 13.4% vs. main code):
    • 178 *.json files (8,531 lines of code)
    • 39 *.md files (4,201 lines of code)
    • 10 *.js files (1,458 lines of code)
    • 12 *.tsx files (864 lines of code)
    • 25 *.svg files (347 lines of code)
    • 7 *.ts files (163 lines of code)
    • 4 *.css files (78 lines of code)
    • 2 *.plist files (36 lines of code)
    • 2 *.html files (33 lines of code)
  • " *.json" is biggest, containing 54.3% of code.
  • " *.html" is smallest, containing 0.21% of code.


*.json8531 LOC (54%) 178 files
*.md4201 LOC (26%) 39 files
*.js1458 LOC (9%) 10 files
*.tsx864 LOC (5%) 12 files
*.svg347 LOC (2%) 25 files
*.ts163 LOC (1%) 7 files
*.css78 LOC (<1%) 4 files
*.plist36 LOC (<1%) 2 files
*.html33 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.tsx 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
  • *.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
  • *.css files are analyzed with CssAnalyzer:
    • 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
  • *.ps1 files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.html files are analyzed with HtmlAnalyzer:
    • 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
  • *.nsh files are analyzed with AdabasNaturalAnalyzer:
    • 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


2022-01-31 00:55