microsoft / BotBuilder-V3
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
hbs
csproj
resx
asax
xlf
cmd
nuspec
cshtml
npmignore
pug
gitattributes
props
txt
vsixmanifest
cgi
targets
shproj
editorconfig
vstemplate
eslintignore
  • 36 extensions are included in analyses: cs, js, ts, hbs, json, csproj, resx, md, asax, htm, xlf, cmd, css, gitignore, nuspec, html, cshtml, ps1, npmignore, pug, xml, gitattributes, bat, props, txt, vsixmanifest, cgi, targets, sql, shproj, editorconfig, yml, vstemplate, svg, XML, eslintignore
  • 13 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (25 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (87 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (29 files).
    • exclude files with path like ".*[.]resx" (The resx resource files) (49 files).
    • exclude files with path like ".*/bootstrap[.](js|css|less|scss|styl)" (Bootstrap) (3 files).
    • exclude files with path like "(?i).*/jquery.*[.]js" (jQuery files) (3 files).
    • exclude files with path like ".*/jquery([^.]*)\.validate(\.unobtrusive)?\.js" (jQuery validation plugin (MS bundles this with asp.net mvc)) (0 files).
    • exclude files with path like ".*jquery[.].*[.]js" (jQuery library) (0 files).
    • exclude files with path like ".*/modernizr\-\d\.\d+(\.\d+)?\.js" (Modernizr) (1 file).
    • 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.

main56209 LOC (36%) 619 files
test18137 LOC (11%) 96 files
generated20750 LOC (13%) 108 files
build and deployment3298 LOC (2%) 33 files
other55966 LOC (36%) 521 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cmd
vstemplate
props
vsixmanifest
shproj
targets
asax
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 619 files match defined criteria (56,209 lines of code, 100.0% vs. main code):
    • 351 *.cs files (29,141 lines of code)
    • 128 *.js files (14,222 lines of code)
    • 108 *.ts files (12,181 lines of code)
    • 16 *.cmd files (202 lines of code)
    • 5 *.ps1 files (158 lines of code)
    • 1 *.css files (106 lines of code)
    • 1 *.html files (53 lines of code)
    • 1 *.vstemplate files (41 lines of code)
    • 2 *.props files (29 lines of code)
    • 1 *.htm files (26 lines of code)
    • 1 *.vsixmanifest files (26 lines of code)
    • 1 *.shproj files (13 lines of code)
    • 1 *.targets files (9 lines of code)
    • 2 *.asax files (2 lines of code)
  • " *.cs" is biggest, containing 51.84% of code.
  • " *.asax" is smallest, containing 0% of code.


*.cs29141 LOC (51%) 351 files
*.js14222 LOC (25%) 128 files
*.ts12181 LOC (21%) 108 files
*.cmd202 LOC (<1%) 16 files
*.ps1158 LOC (<1%) 5 files
*.css106 LOC (<1%) 1 files
*.html53 LOC (<1%) 1 files
*.vstemplate41 LOC (<1%) 1 files
*.props29 LOC (<1%) 2 files
*.htm26 LOC (<1%) 1 files
*.vsixmanifest26 LOC (<1%) 1 files
*.shproj13 LOC (<1%) 1 files
*.targets9 LOC (<1%) 1 files
*.asax2 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
xlf
csproj
asax
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*[.][Tt]ests/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 96 files match defined criteria (18,137 lines of code, 32.3% vs. main code):
    • 70 *.cs files (11,158 lines of code)
    • 2 *.xlf files (3,496 lines of code)
    • 16 *.js files (2,287 lines of code)
    • 6 *.csproj files (1,154 lines of code)
    • 1 *.ts files (41 lines of code)
    • 1 *.asax files (1 lines of code)
  • " *.cs" is biggest, containing 61.52% of code.
  • " *.asax" is smallest, containing 0.01% of code.


*.cs11158 LOC (61%) 70 files
*.xlf3496 LOC (19%) 2 files
*.js2287 LOC (12%) 16 files
*.csproj1154 LOC (6%) 6 files
*.ts41 LOC (<1%) 1 files
*.asax1 LOC (<1%) 1 files
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*[.]cs" AND any line of content like "[/][/][ ]*".
  • 108 files match defined criteria (20,750 lines of code, 36.9% vs. main code):
    • 6 *.json files (14,054 lines of code)
    • 102 *.cs files (6,696 lines of code)
  • " *.json" is biggest, containing 67.73% of code.
  • " *.cs" is smallest, containing 32.27% of code.


*.json14054 LOC (67%) 6 files
*.cs6696 LOC (32%) 102 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
nuspec
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*[.]nuspec".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]bat".
  • 33 files match defined criteria (3,298 lines of code, 5.9% vs. main code):
    • 22 *.csproj files (2,903 lines of code)
    • 10 *.nuspec files (393 lines of code)
    • 1 *.bat files (2 lines of code)
  • " *.csproj" is biggest, containing 88.02% of code.
  • " *.bat" is smallest, containing 0.06% of code.


*.csproj2903 LOC (88%) 22 files
*.nuspec393 LOC (11%) 10 files
*.bat2 LOC (<1%) 1 files
Other Code
csproj
xlf
cshtml
pug
asax
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 521 files match defined criteria (55,966 lines of code, 99.6% vs. main code):
    • 70 *.json files (26,325 lines of code)
    • 230 *.cs files (10,379 lines of code)
    • 39 *.csproj files (7,607 lines of code)
    • 60 *.js files (3,774 lines of code)
    • 5 *.css files (2,717 lines of code)
    • 2 *.xlf files (2,124 lines of code)
    • 37 *.md files (1,508 lines of code)
    • 3 *.xml files (724 lines of code)
    • 7 *.html files (296 lines of code)
    • 23 *.htm files (270 lines of code)
    • 6 *.cshtml files (109 lines of code)
    • 1 *.sql files (53 lines of code)
    • 4 *.pug files (45 lines of code)
    • 32 *.asax files (32 lines of code)
    • 2 *.bat files (3 lines of code)
  • " *.json" is biggest, containing 47.04% of code.
  • " *.bat" is smallest, containing 0.01% of code.


*.json26325 LOC (47%) 70 files
*.cs10379 LOC (18%) 230 files
*.csproj7607 LOC (13%) 39 files
*.js3774 LOC (6%) 60 files
*.css2717 LOC (4%) 5 files
*.xlf2124 LOC (3%) 2 files
*.md1508 LOC (2%) 37 files
*.xml724 LOC (1%) 3 files
*.html296 LOC (<1%) 7 files
*.htm270 LOC (<1%) 23 files
*.cshtml109 LOC (<1%) 6 files
*.sql53 LOC (<1%) 1 files
*.pug45 LOC (<1%) 4 files
*.asax32 LOC (<1%) 32 files
*.bat3 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.cs files are analyzed with CSharpAnalyzer:
    • 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 (based on namespace heuristics)
  • *.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
  • *.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
  • *.cmd 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
  • *.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
  • *.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
  • *.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
  • *.vstemplate files are analyzed with XmlAnalyzer:
    • 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
  • *.props files are analyzed with XmlAnalyzer:
    • 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
  • *.htm 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
  • *.vsixmanifest files are analyzed with XmlAnalyzer:
    • 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
  • *.shproj files are analyzed with XmlAnalyzer:
    • 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
  • *.targets files are analyzed with XmlAnalyzer:
    • 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
  • *.asax 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


2022-01-30 22:11