microsoft / reactxp
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
plist
properties
npmignore
pro
xaml
csproj
babelrc
txt
  • 29 extensions are included in analyses: tsx, ts, js, md, json, xml, gitignore, plist, html, gradle, cs, m, properties, java, npmignore, xib, bat, bzl, yml, svg, h, pro, xaml, csproj, scss, css, babelrc, rb, txt
  • 10 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (39 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (71 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (10 files).
    • exclude files with path like ".*/proguard[-]rules[.]pro" (ProGuard) (5 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (5 files).
    • exclude files with path like ".*/react(-[^.]*)?\.js" (React) (3 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.

main19988 LOC (9%) 240 files
test0 LOC (0%) 0 files
generated82527 LOC (40%) 5 files
build and deployment0 LOC (0%) 0 files
other101143 LOC (49%) 362 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 ".*".
  • 240 files match defined criteria (19,988 lines of code, 100.0% vs. main code):
    • 92 *.tsx files (13,366 lines of code)
    • 112 *.ts files (6,540 lines of code)
    • 35 *.js files (70 lines of code)
    • 1 *.yml files (12 lines of code)
  • " *.tsx" is biggest, containing 66.87% of code.
  • " *.yml" is smallest, containing 0.06% of code.


*.tsx13366 LOC (66%) 92 files
*.ts6540 LOC (32%) 112 files
*.js70 LOC (<1%) 35 files
*.yml12 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".
  • 5 files match defined criteria (82,527 lines of code, 412.9% vs. main code). All matches are in *.json files.


*.json82527 LOC (100%) 5 files
Other Code
csproj
plist
properties
xaml
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 ".*/[.]npmignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]xib".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 362 files match defined criteria (101,143 lines of code, 506.0% vs. main code):
    • 39 *.json files (83,680 lines of code)
    • 74 *.tsx files (9,481 lines of code)
    • 48 *.js files (1,490 lines of code)
    • 5 *.csproj files (1,177 lines of code)
    • 32 *.ts files (1,105 lines of code)
    • 17 *.plist files (693 lines of code)
    • 15 *.gradle files (483 lines of code)
    • 24 *.md files (420 lines of code)
    • 14 *.m files (387 lines of code)
    • 1 *.css files (373 lines of code)
    • 5 *.bat files (365 lines of code)
    • 15 *.cs files (351 lines of code)
    • 11 *.java files (314 lines of code)
    • 28 *.xml files (239 lines of code)
    • 5 *.xib files (210 lines of code)
    • 5 *.html files (135 lines of code)
    • 9 *.properties files (95 lines of code)
    • 5 *.bzl files (85 lines of code)
    • 5 *.xaml files (35 lines of code)
    • 5 *.h files (25 lines of code)
  • " *.json" is biggest, containing 82.73% of code.
  • " *.h" is smallest, containing 0.02% of code.


*.json83680 LOC (82%) 39 files
*.tsx9481 LOC (9%) 74 files
*.js1490 LOC (1%) 48 files
*.csproj1177 LOC (1%) 5 files
*.ts1105 LOC (1%) 32 files
*.plist693 LOC (<1%) 17 files
*.gradle483 LOC (<1%) 15 files
*.md420 LOC (<1%) 24 files
*.m387 LOC (<1%) 14 files
*.css373 LOC (<1%) 1 files
*.bat365 LOC (<1%) 5 files
*.cs351 LOC (<1%) 15 files
*.java314 LOC (<1%) 11 files
*.xml239 LOC (<1%) 28 files
*.xib210 LOC (<1%) 5 files
*.html135 LOC (<1%) 5 files
*.properties95 LOC (<1%) 9 files
*.bzl85 LOC (<1%) 5 files
*.xaml35 LOC (<1%) 5 files
*.h25 LOC (<1%) 5 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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-30 14:50