pytorch / live
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
diff
mdx
properties
plist
txt
pro
storyboard
gitattributes
editorconfig
podspec
eslintignore
  • 30 extensions are included in analyses: tsx, ts, java, json, js, swift, xml, diff, h, m, mdx, md, yml, gradle, css, properties, plist, gitignore, py, txt, bat, mm, cpp, svg, pro, storyboard, gitattributes, editorconfig, podspec, eslintignore
  • 9 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/react(-[^.]*)?\.js" (React) (10 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (26 files).
    • exclude files with path like ".*/proguard[-]rules[.]pro" (ProGuard) (3 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (4 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (15 files).
    • exclude files with path like ".*/bootstrap[.](js|css|less|scss|styl)" (Bootstrap) (0 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 ".*[.]txt" (Text files) (4 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.

main17776 LOC (58%) 298 files
test838 LOC (2%) 17 files
generated0 LOC (0%) 0 files
build and deployment915 LOC (3%) 15 files
other10942 LOC (35%) 181 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 ".*".
  • 298 files match defined criteria (17,776 lines of code, 100.0% vs. main code):
    • 64 *.tsx files (4,573 lines of code)
    • 53 *.java files (3,941 lines of code)
    • 75 *.ts files (3,675 lines of code)
    • 34 *.swift files (2,683 lines of code)
    • 22 *.js files (1,125 lines of code)
    • 8 *.css files (854 lines of code)
    • 17 *.m files (422 lines of code)
    • 4 *.mm files (228 lines of code)
    • 17 *.h files (145 lines of code)
    • 4 *.cpp files (130 lines of code)
  • " *.tsx" is biggest, containing 25.73% of code.
  • " *.cpp" is smallest, containing 0.73% of code.


*.tsx4573 LOC (25%) 64 files
*.java3941 LOC (22%) 53 files
*.ts3675 LOC (20%) 75 files
*.swift2683 LOC (15%) 34 files
*.js1125 LOC (6%) 22 files
*.css854 LOC (4%) 8 files
*.m422 LOC (2%) 17 files
*.mm228 LOC (1%) 4 files
*.h145 LOC (<1%) 17 files
*.cpp130 LOC (<1%) 4 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 paths like ".*/e2e/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*/test_.*".
  • 17 files match defined criteria (838 lines of code, 4.7% vs. main code):
    • 10 *.ts files (452 lines of code)
    • 4 *.java files (373 lines of code)
    • 3 *.tsx files (13 lines of code)
  • " *.ts" is biggest, containing 53.94% of code.
  • " *.tsx" is smallest, containing 1.55% of code.


*.ts452 LOC (53%) 10 files
*.java373 LOC (44%) 4 files
*.tsx13 LOC (1%) 3 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 ".*/package[.]json".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]bat".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*[.]podspec".
  • 15 files match defined criteria (915 lines of code, 5.1% vs. main code):
    • 10 *.gradle files (576 lines of code)
    • 4 *.bat files (303 lines of code)
    • 1 *.podspec files (36 lines of code)
  • " *.gradle" is biggest, containing 62.95% of code.
  • " *.podspec" is smallest, containing 3.93% of code.


*.gradle576 LOC (62%) 10 files
*.bat303 LOC (33%) 4 files
*.podspec36 LOC (3%) 1 files
Other Code
diff
plist
storyboard
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*[.]mdx".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]diff".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 181 files match defined criteria (10,942 lines of code, 61.6% vs. main code):
    • 57 *.tsx files (4,650 lines of code)
    • 44 *.json files (3,721 lines of code)
    • 19 *.diff files (817 lines of code)
    • 1 *.ts files (392 lines of code)
    • 3 *.js files (331 lines of code)
    • 30 *.xml files (264 lines of code)
    • 7 *.plist files (255 lines of code)
    • 10 *.md files (252 lines of code)
    • 3 *.storyboard files (149 lines of code)
    • 4 *.properties files (76 lines of code)
    • 3 *.py files (35 lines of code)
  • " *.tsx" is biggest, containing 42.5% of code.
  • " *.py" is smallest, containing 0.32% of code.


*.tsx4650 LOC (42%) 57 files
*.json3721 LOC (34%) 44 files
*.diff817 LOC (7%) 19 files
*.ts392 LOC (3%) 1 files
*.js331 LOC (3%) 3 files
*.xml264 LOC (2%) 30 files
*.plist255 LOC (2%) 7 files
*.md252 LOC (2%) 10 files
*.storyboard149 LOC (1%) 3 files
*.properties76 LOC (<1%) 4 files
*.py35 LOC (<1%) 3 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
  • *.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)
  • *.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
  • *.swift files are analyzed with SwiftAnalyzer:
    • 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
  • *.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
  • *.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
  • *.mm 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
  • *.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


2022-01-24 14:36