microsoft / BotBuilder-Location
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
csproj
npmignore
asax
resx
txt
nuspec
  • 17 extensions are included in analyses: cs, js, ts, json, md, csproj, gitignore, html, htm, css, npmignore, asax, resx, txt, XML, xml, nuspec
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (3 files).
    • exclude files with path like ".*[.]resx" (The resx resource files) (1 file).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (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) (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.

main5507 LOC (63%) 88 files
test290 LOC (3%) 5 files
generated263 LOC (3%) 1 files
build and deployment344 LOC (3%) 3 files
other2261 LOC (26%) 18 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
asax
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 88 files match defined criteria (5,507 lines of code, 100.0% vs. main code):
    • 42 *.cs files (2,022 lines of code)
    • 1 *.xml files (1,317 lines of code)
    • 22 *.js files (1,124 lines of code)
    • 21 *.ts files (1,031 lines of code)
    • 1 *.htm files (12 lines of code)
    • 1 *.asax files (1 lines of code)
  • " *.cs" is biggest, containing 36.72% of code.
  • " *.asax" is smallest, containing 0.02% of code.


*.cs2022 LOC (36%) 42 files
*.xml1317 LOC (23%) 1 files
*.js1124 LOC (20%) 22 files
*.ts1031 LOC (18%) 21 files
*.htm12 LOC (<1%) 1 files
*.asax1 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
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 any line of content like ".*/simpletest/.*".
  • 5 files match defined criteria (290 lines of code, 5.3% vs. main code):
    • 4 *.cs files (146 lines of code)
    • 1 *.csproj files (144 lines of code)
  • " *.cs" is biggest, containing 50.34% of code.
  • " *.csproj" is smallest, containing 49.66% of code.


*.cs146 LOC (50%) 4 files
*.csproj144 LOC (49%) 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 ".*[.]cs" AND any line of content like "[/][/][ ]*".
  • 1 file matches defined criteria (263 lines of code, 4.8% vs. main code). All matches are in *.cs files.


*.cs263 LOC (100%) 1 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 ".*/[.]gitignore".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*[.]nuspec".
    • files with paths like ".*/package[.]json".
  • 3 files match defined criteria (344 lines of code, 6.2% vs. main code):
    • 2 *.csproj files (328 lines of code)
    • 1 *.nuspec files (16 lines of code)
  • " *.csproj" is biggest, containing 95.35% of code.
  • " *.nuspec" is smallest, containing 4.65% of code.


*.csproj328 LOC (95%) 2 files
*.nuspec16 LOC (4%) 1 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 18 files match defined criteria (2,261 lines of code, 41.1% vs. main code):
    • 1 *.css files (1,277 lines of code)
    • 7 *.json files (406 lines of code)
    • 7 *.md files (289 lines of code)
    • 1 *.xml files (182 lines of code)
    • 2 *.html files (107 lines of code)
  • " *.css" is biggest, containing 56.48% of code.
  • " *.html" is smallest, containing 4.73% of code.


*.css1277 LOC (56%) 1 files
*.json406 LOC (17%) 7 files
*.md289 LOC (12%) 7 files
*.xml182 LOC (8%) 1 files
*.html107 LOC (4%) 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)
  • *.xml 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
  • *.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
  • *.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
  • *.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 14:03