microsoft / appcenter-sdk-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
podspec
pro
npmignore
watchmanconfig
txt
eslintignore
gitattributes
project
patch
babelrc
clang-format
  • 31 extensions are included in analyses: h, js, json, sh, java, m, plist, gradle, xml, properties, gitignore, md, ts, bat, markdown, podspec, pro, npmignore, watchmanconfig, xib, tsx, txt, eslintignore, gitattributes, bzl, cpp, project, patch, yml, babelrc, clang-format
  • 9 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (36 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (5 files).
    • exclude files with path like ".*/proguard[-]rules[.]pro" (ProGuard) (5 files).
    • exclude files with path like ".*/react(-[^.]*)?\.js" (React) (4 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (4 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) (2 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.

main7660 LOC (51%) 138 files
test186 LOC (1%) 10 files
generated2905 LOC (19%) 157 files
build and deployment1527 LOC (10%) 49 files
other2726 LOC (18%) 94 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 ".*".
  • 138 files match defined criteria (7,660 lines of code, 100.0% vs. main code):
    • 67 *.js files (4,067 lines of code)
    • 26 *.java files (1,607 lines of code)
    • 20 *.m files (1,262 lines of code)
    • 4 *.tsx files (434 lines of code)
    • 3 *.ts files (124 lines of code)
    • 13 *.h files (73 lines of code)
    • 2 *.cpp files (58 lines of code)
    • 3 *.bzl files (35 lines of code)
  • " *.js" is biggest, containing 53.09% of code.
  • " *.bzl" is smallest, containing 0.46% of code.


*.js4067 LOC (53%) 67 files
*.java1607 LOC (20%) 26 files
*.m1262 LOC (16%) 20 files
*.tsx434 LOC (5%) 4 files
*.ts124 LOC (1%) 3 files
*.h73 LOC (<1%) 13 files
*.cpp58 LOC (<1%) 2 files
*.bzl35 LOC (<1%) 3 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 ".*/__mocks?__/.*".
    • files with paths like ".*__tests__.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 10 files match defined criteria (186 lines of code, 2.4% vs. main code). All matches are in *.js files.


*.js186 LOC (100%) 10 files
Generated Code
Automatically generated files, not manually changed after generation.
plist
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/Pods/.*".
  • 157 files match defined criteria (2,905 lines of code, 37.9% vs. main code):
    • 128 *.h files (1,488 lines of code)
    • 10 *.sh files (1,020 lines of code)
    • 5 *.plist files (233 lines of code)
    • 5 *.markdown files (71 lines of code)
    • 2 *.json files (54 lines of code)
    • 5 *.m files (25 lines of code)
    • 2 *.md files (14 lines of code)
  • " *.h" is biggest, containing 51.22% of code.
  • " *.md" is smallest, containing 0.48% of code.


*.h1488 LOC (51%) 128 files
*.sh1020 LOC (35%) 10 files
*.plist233 LOC (8%) 5 files
*.markdown71 LOC (2%) 5 files
*.json54 LOC (1%) 2 files
*.m25 LOC (<1%) 5 files
*.md14 LOC (<1%) 2 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 ".*[.]gradle".
    • files with paths like ".*[.]bat".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*/package[.]json".
  • 49 files match defined criteria (1,527 lines of code, 19.9% vs. main code):
    • 18 *.gradle files (669 lines of code)
    • 21 *.sh files (410 lines of code)
    • 5 *.bat files (360 lines of code)
    • 5 *.podspec files (88 lines of code)
  • " *.gradle" is biggest, containing 43.81% of code.
  • " *.podspec" is smallest, containing 5.76% of code.


*.gradle669 LOC (43%) 18 files
*.sh410 LOC (26%) 21 files
*.bat360 LOC (23%) 5 files
*.podspec88 LOC (5%) 5 files
Other Code
plist
properties
patch
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 ".*/[.]npmignore".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]plist".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]xib".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]patch".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]markdown".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 94 files match defined criteria (2,726 lines of code, 35.6% vs. main code):
    • 28 *.json files (803 lines of code)
    • 24 *.plist files (750 lines of code)
    • 7 *.md files (639 lines of code)
    • 16 *.xml files (183 lines of code)
    • 4 *.xib files (168 lines of code)
    • 9 *.properties files (88 lines of code)
    • 5 *.markdown files (71 lines of code)
    • 1 *.patch files (24 lines of code)
  • " *.json" is biggest, containing 29.46% of code.
  • " *.patch" is smallest, containing 0.88% of code.


*.json803 LOC (29%) 28 files
*.plist750 LOC (27%) 24 files
*.md639 LOC (23%) 7 files
*.xml183 LOC (6%) 16 files
*.xib168 LOC (6%) 4 files
*.properties88 LOC (3%) 9 files
*.markdown71 LOC (2%) 5 files
*.patch24 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.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
  • *.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
  • *.cpp 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
  • *.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


2022-01-30 13:55