tensorflow / tfjs-models
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
babelrc
npmignore
txt
npmrc
  • 15 extensions are included in analyses: ts, json, js, md, html, yml, babelrc, npmignore, sh, gitignore, scss, css, ipynb, txt, npmrc
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (46 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) (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.

main32345 LOC (40%) 516 files
test13643 LOC (16%) 171 files
generated8855 LOC (10%) 1 files
build and deployment269 LOC (<1%) 9 files
other25407 LOC (31%) 225 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 ".*".
  • 516 files match defined criteria (32,345 lines of code, 100.0% vs. main code):
    • 467 *.ts files (30,058 lines of code)
    • 22 *.js files (1,381 lines of code)
    • 19 *.yml files (813 lines of code)
    • 5 *.scss files (62 lines of code)
    • 3 *.html files (31 lines of code)
  • " *.ts" is biggest, containing 92.93% of code.
  • " *.html" is smallest, containing 0.1% of code.


*.ts30058 LOC (92%) 467 files
*.js1381 LOC (4%) 22 files
*.yml813 LOC (2%) 19 files
*.scss62 LOC (<1%) 5 files
*.html31 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 ".*_tests[.].*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/karma[.]conf[.]js".
    • files with paths like ".*[.]spec[.]ts".
    • files with any line of content like ".*/simpletest/.*".
  • 171 files match defined criteria (13,643 lines of code, 42.2% vs. main code):
    • 164 *.ts files (13,021 lines of code)
    • 6 *.js files (620 lines of code)
    • 1 *.sh files (2 lines of code)
  • " *.ts" is biggest, containing 95.44% of code.
  • " *.sh" is smallest, containing 0.01% of code.


*.ts13021 LOC (95%) 164 files
*.js620 LOC (4%) 6 files
*.sh2 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".
  • 1 file matches defined criteria (8,855 lines of code, 27.4% vs. main code). All matches are in *.json files.


*.json8855 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 ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/package[-]lock[.]json".
  • 9 files match defined criteria (269 lines of code, 0.8% vs. main code). All matches are in *.sh files.


*.sh269 LOC (100%) 9 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]npmrc".
  • 225 files match defined criteria (25,407 lines of code, 78.6% vs. main code):
    • 94 *.json files (11,741 lines of code)
    • 60 *.js files (7,458 lines of code)
    • 48 *.md files (4,665 lines of code)
    • 21 *.html files (1,349 lines of code)
    • 2 *.css files (194 lines of code)
  • " *.json" is biggest, containing 46.21% of code.
  • " *.css" is smallest, containing 0.76% of code.


*.json11741 LOC (46%) 94 files
*.js7458 LOC (29%) 60 files
*.md4665 LOC (18%) 48 files
*.html1349 LOC (5%) 21 files
*.css194 LOC (<1%) 2 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
  • *.scss files are analyzed with ScssAnalyzer:
    • 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
  • *.html files are analyzed with HtmlAnalyzer:
    • 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-02-03 08:05