microsoft / immersive-reader-sdk
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
cshtml
txt
csproj
properties
pug
xaml
plist
pro
hbs
npmignore
podspec
prefs
prettierignore
  • 32 extensions are included in analyses: js, json, cs, cshtml, xml, md, css, java, html, svg, gitignore, ts, gradle, txt, csproj, swift, properties, pug, xaml, plist, bat, kt, pro, hbs, npmignore, jsp, py, yml, podspec, h, prefs, prettierignore
  • 15 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (23 files).
    • exclude files with path like ".*[.]min[.]js" (Minimized JS library) (2 files).
    • exclude files with path like ".*/dist/.*" (Distributions) (12 files).
    • exclude files with path like ".*/bootstrap[.](js|css|less|scss|styl)" (Bootstrap) (0 files).
    • exclude files with path like "(?i).*/jquery.*[.]js" (jQuery files) (2 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 ".*/proguard[-]rules[.]pro" (ProGuard) (2 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (2 files).
    • exclude files with path like ".*/react(-[^.]*)?\.js" (React) (6 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) (5 files).
    • exclude files with path like ".*/bootstrap[-].*" (Library) (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.

main522 LOC (1%) 11 files
test385 LOC (<1%) 2 files
generated19218 LOC (40%) 1 files
build and deployment50 LOC (<1%) 2 files
other27170 LOC (57%) 215 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 11 files match defined criteria (522 lines of code, 100.0% vs. main code):
    • 7 *.ts files (483 lines of code)
    • 3 *.js files (28 lines of code)
    • 1 *.yml files (11 lines of code)
  • " *.ts" is biggest, containing 92.53% of code.
  • " *.yml" is smallest, containing 2.11% of code.


*.ts483 LOC (92%) 7 files
*.js28 LOC (5%) 3 files
*.yml11 LOC (2%) 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]ests/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 2 files match defined criteria (385 lines of code, 73.8% vs. main code). All matches are in *.ts files.


*.ts385 LOC (100%) 2 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".
  • 1 file matches defined criteria (19,218 lines of code, 3681.6% vs. main code). All matches are in *.json files.


*.json19218 LOC (100%) 1 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
podspec
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 ".*[.]podspec".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]bat".
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
  • 2 files match defined criteria (50 lines of code, 9.6% vs. main code):
    • 1 *.js files (32 lines of code)
    • 1 *.podspec files (18 lines of code)
  • " *.js" is biggest, containing 64% of code.
  • " *.podspec" is smallest, containing 36% of code.


*.js32 LOC (64%) 1 files
*.podspec18 LOC (36%) 1 files
Other Code
cshtml
csproj
pug
plist
hbs
xaml
properties
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 ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 215 files match defined criteria (27,170 lines of code, 5205.0% vs. main code):
    • 26 *.json files (19,933 lines of code)
    • 23 *.cshtml files (1,221 lines of code)
    • 16 *.html files (1,142 lines of code)
    • 27 *.cs files (888 lines of code)
    • 20 *.xml files (731 lines of code)
    • 18 *.java files (590 lines of code)
    • 20 *.md files (483 lines of code)
    • 19 *.js files (399 lines of code)
    • 5 *.csproj files (370 lines of code)
    • 3 *.swift files (291 lines of code)
    • 2 *.kt files (207 lines of code)
    • 10 *.css files (184 lines of code)
    • 1 *.jsp files (124 lines of code)
    • 2 *.bat files (122 lines of code)
    • 6 *.gradle files (104 lines of code)
    • 3 *.pug files (101 lines of code)
    • 2 *.plist files (64 lines of code)
    • 2 *.hbs files (57 lines of code)
    • 3 *.xaml files (44 lines of code)
    • 2 *.properties files (40 lines of code)
    • 3 *.svg files (36 lines of code)
    • 1 *.py files (36 lines of code)
    • 1 *.h files (3 lines of code)
  • " *.json" is biggest, containing 73.36% of code.
  • " *.h" is smallest, containing 0.01% of code.


*.json19933 LOC (73%) 26 files
*.cshtml1221 LOC (4%) 23 files
*.html1142 LOC (4%) 16 files
*.cs888 LOC (3%) 27 files
*.xml731 LOC (2%) 20 files
*.java590 LOC (2%) 18 files
*.md483 LOC (1%) 20 files
*.js399 LOC (1%) 19 files
*.csproj370 LOC (1%) 5 files
*.swift291 LOC (1%) 3 files
*.kt207 LOC (<1%) 2 files
*.css184 LOC (<1%) 10 files
*.jsp124 LOC (<1%) 1 files
*.bat122 LOC (<1%) 2 files
*.gradle104 LOC (<1%) 6 files
*.pug101 LOC (<1%) 3 files
*.plist64 LOC (<1%) 2 files
*.hbs57 LOC (<1%) 2 files
*.xaml44 LOC (<1%) 3 files
*.properties40 LOC (<1%) 2 files
*.svg36 LOC (<1%) 3 files
*.py36 LOC (<1%) 1 files
*.h3 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
  • *.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


2022-01-31 00:59