microsoft / WebTemplateStudio
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
gitattributes
txt
props
plist
xaml
properties
prettierignore
watchmanconfig
editorconfig
pro
storyboard
gitmodules
targets
vscodeignore
  • 36 extensions are included in analyses: ts, json, tsx, js, md, css, svg, cs, py, html, gitignore, vue, sh, xml, csproj, gitattributes, txt, ps1, java, m, gradle, props, plist, xaml, properties, prettierignore, watchmanconfig, bat, bzl, editorconfig, pro, storyboard, gitmodules, targets, h, vscodeignore
  • 9 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (185 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (37 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (18 files).
    • exclude files with path like ".*/proguard[-]rules[.]pro" (ProGuard) (1 file).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (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) (3 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.

main22404 LOC (76%) 680 files
test2985 LOC (10%) 65 files
generated0 LOC (0%) 0 files
build and deployment650 LOC (2%) 28 files
other3136 LOC (10%) 138 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
xaml
props
targets
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 680 files match defined criteria (22,404 lines of code, 100.0% vs. main code):
    • 317 *.ts files (10,930 lines of code)
    • 94 *.tsx files (4,416 lines of code)
    • 79 *.css files (2,484 lines of code)
    • 90 *.js files (1,708 lines of code)
    • 25 *.cs files (704 lines of code)
    • 15 *.vue files (644 lines of code)
    • 3 *.ps1 files (545 lines of code)
    • 25 *.py files (377 lines of code)
    • 19 *.html files (295 lines of code)
    • 3 *.java files (126 lines of code)
    • 3 *.m files (110 lines of code)
    • 2 *.xaml files (26 lines of code)
    • 1 *.bzl files (17 lines of code)
    • 2 *.props files (12 lines of code)
    • 1 *.h files (5 lines of code)
    • 1 *.targets files (5 lines of code)
  • " *.ts" is biggest, containing 48.79% of code.
  • " *.targets" is smallest, containing 0.02% of code.


*.ts10930 LOC (48%) 317 files
*.tsx4416 LOC (19%) 94 files
*.css2484 LOC (11%) 79 files
*.js1708 LOC (7%) 90 files
*.cs704 LOC (3%) 25 files
*.vue644 LOC (2%) 15 files
*.ps1545 LOC (2%) 3 files
*.py377 LOC (1%) 25 files
*.html295 LOC (1%) 19 files
*.java126 LOC (<1%) 3 files
*.m110 LOC (<1%) 3 files
*.xaml26 LOC (<1%) 2 files
*.bzl17 LOC (<1%) 1 files
*.props12 LOC (<1%) 2 files
*.h5 LOC (<1%) 1 files
*.targets5 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 ".*/[Tt]est/.*".
    • files with paths like ".*__tests__.*".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*/protractor[.]conf[.]js".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*/karma[.]conf[.]js".
    • files with any line of content like ".*/simpletest/.*".
  • 65 files match defined criteria (2,985 lines of code, 13.3% vs. main code):
    • 33 *.tsx files (2,003 lines of code)
    • 29 *.ts files (902 lines of code)
    • 3 *.js files (80 lines of code)
  • " *.tsx" is biggest, containing 67.1% of code.
  • " *.js" is smallest, containing 2.68% of code.


*.tsx2003 LOC (67%) 33 files
*.ts902 LOC (30%) 29 files
*.js80 LOC (2%) 3 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
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 ".*/[.]gitmodules".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]csproj".
  • 28 files match defined criteria (650 lines of code, 2.9% vs. main code):
    • 5 *.csproj files (214 lines of code)
    • 3 *.gradle files (121 lines of code)
    • 11 *.gitignore files (106 lines of code)
    • 7 *.sh files (84 lines of code)
    • 1 *.bat files (68 lines of code)
    • 1 *.js files (57 lines of code)
  • " *.csproj" is biggest, containing 32.92% of code.
  • " *.js" is smallest, containing 8.77% of code.


*.csproj214 LOC (32%) 5 files
*.gradle121 LOC (18%) 3 files
*.gitignore106 LOC (16%) 11 files
*.sh84 LOC (12%) 7 files
*.bat68 LOC (10%) 1 files
*.js57 LOC (8%) 1 files
Other Code
plist
storyboard
properties
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 ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]vscodeignore".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 138 files match defined criteria (3,136 lines of code, 14.0% vs. main code):
    • 55 *.json files (1,671 lines of code)
    • 38 *.md files (671 lines of code)
    • 35 *.svg files (592 lines of code)
    • 2 *.plist files (79 lines of code)
    • 6 *.xml files (55 lines of code)
    • 1 *.storyboard files (46 lines of code)
    • 1 *.properties files (22 lines of code)
  • " *.json" is biggest, containing 53.28% of code.
  • " *.properties" is smallest, containing 0.7% of code.


*.json1671 LOC (53%) 55 files
*.md671 LOC (21%) 38 files
*.svg592 LOC (18%) 35 files
*.plist79 LOC (2%) 2 files
*.xml55 LOC (1%) 6 files
*.storyboard46 LOC (1%) 1 files
*.properties22 LOC (<1%) 1 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
  • *.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
  • *.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
  • *.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)
  • *.vue 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
  • *.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
  • *.py 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
  • *.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
  • *.java files are analyzed with JavaAnalyzer:
    • 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 package names)
  • *.m 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
  • *.xaml 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
  • *.bzl 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
  • *.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
  • *.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
  • *.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


2022-01-30 23:55