microsoft / appcenter-sampleapp-react-native
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
gitattributes
pro
storyboard
txt
  • 19 extensions are included in analyses: tsx, json, plist, js, java, m, xml, gradle, h, properties, gitattributes, bat, md, yml, gitignore, pro, storyboard, txt, ts
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (4 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) (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.

main913 LOC (3%) 28 files
test59 LOC (<1%) 2 files
generated13674 LOC (47%) 1 files
build and deployment213 LOC (<1%) 4 files
other14145 LOC (48%) 20 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 ".*".
  • 28 files match defined criteria (913 lines of code, 100.0% vs. main code):
    • 11 *.tsx files (513 lines of code)
    • 5 *.m files (190 lines of code)
    • 4 *.java files (128 lines of code)
    • 1 *.yml files (43 lines of code)
    • 4 *.js files (22 lines of code)
    • 1 *.ts files (9 lines of code)
    • 2 *.h files (8 lines of code)
  • " *.tsx" is biggest, containing 56.19% of code.
  • " *.h" is smallest, containing 0.88% of code.


*.tsx513 LOC (56%) 11 files
*.m190 LOC (20%) 5 files
*.java128 LOC (14%) 4 files
*.yml43 LOC (4%) 1 files
*.js22 LOC (2%) 4 files
*.ts9 LOC (<1%) 1 files
*.h8 LOC (<1%) 2 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 ".*__tests__.*".
    • files with paths like ".*/src/androidTest/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 2 files match defined criteria (59 lines of code, 6.5% vs. main code):
    • 1 *.java files (52 lines of code)
    • 1 *.tsx files (7 lines of code)
  • " *.java" is biggest, containing 88.14% of code.
  • " *.tsx" is smallest, containing 11.86% of code.


*.java52 LOC (88%) 1 files
*.tsx7 LOC (11%) 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".
  • 1 file matches defined criteria (13,674 lines of code, 1497.7% vs. main code). All matches are in *.json files.


*.json13674 LOC (100%) 1 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
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 ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]bat".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
  • 4 files match defined criteria (213 lines of code, 23.3% vs. main code):
    • 3 *.gradle files (137 lines of code)
    • 1 *.bat files (76 lines of code)
  • " *.gradle" is biggest, containing 64.32% of code.
  • " *.bat" is smallest, containing 35.68% of code.


*.gradle137 LOC (64%) 3 files
*.bat76 LOC (35%) 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 ".*/[.]gitignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • 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)".
  • 20 files match defined criteria (14,145 lines of code, 1549.3% vs. main code):
    • 7 *.json files (13,822 lines of code)
    • 6 *.plist files (188 lines of code)
    • 1 *.storyboard files (46 lines of code)
    • 4 *.xml files (41 lines of code)
    • 1 *.md files (32 lines of code)
    • 1 *.properties files (16 lines of code)
  • " *.json" is biggest, containing 97.72% of code.
  • " *.properties" is smallest, containing 0.11% of code.


*.json13822 LOC (97%) 7 files
*.plist188 LOC (1%) 6 files
*.storyboard46 LOC (<1%) 1 files
*.xml41 LOC (<1%) 4 files
*.md32 LOC (<1%) 1 files
*.properties16 LOC (<1%) 1 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
  • *.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
  • *.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)
  • *.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
  • *.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
  • *.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


2022-01-30 16:05