tensorflow / tensorboard
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
proto
gitattributes
txt
patch
cfg
in
clang-format
  • 26 extensions are included in analyses: ts, py, scss, html, proto, md, rs, bzl, sh, ipynb, json, css, js, svg, gitignore, gitattributes, yaml, toml, txt, patch, java, rst, yml, cfg, in, clang-format
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (11 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (14 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (4 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (28 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.

main123320 LOC (59%) 1255 files
test77728 LOC (37%) 311 files
generated0 LOC (0%) 0 files
build and deployment263 LOC (<1%) 8 files
other5127 LOC (2%) 65 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
cfg
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1255 files match defined criteria (123,320 lines of code, 100.0% vs. main code):
    • 782 *.ts files (80,980 lines of code)
    • 223 *.py files (21,955 lines of code)
    • 27 *.rs files (6,003 lines of code)
    • 53 *.proto files (5,478 lines of code)
    • 73 *.scss files (3,511 lines of code)
    • 67 *.html files (3,137 lines of code)
    • 10 *.bzl files (1,104 lines of code)
    • 8 *.css files (474 lines of code)
    • 2 *.java files (440 lines of code)
    • 3 *.toml files (131 lines of code)
    • 5 *.js files (101 lines of code)
    • 1 *.cfg files (3 lines of code)
    • 1 *.in files (3 lines of code)
  • " *.ts" is biggest, containing 65.67% of code.
  • " *.in" is smallest, containing 0% of code.


*.ts80980 LOC (65%) 782 files
*.py21955 LOC (17%) 223 files
*.rs6003 LOC (4%) 27 files
*.proto5478 LOC (4%) 53 files
*.scss3511 LOC (2%) 73 files
*.html3137 LOC (2%) 67 files
*.bzl1104 LOC (<1%) 10 files
*.css474 LOC (<1%) 8 files
*.java440 LOC (<1%) 2 files
*.toml131 LOC (<1%) 3 files
*.js101 LOC (<1%) 5 files
*.cfg3 LOC (<1%) 1 files
*.in3 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/test_.*".
    • files with paths like ".*_test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 311 files match defined criteria (77,728 lines of code, 63.0% vs. main code):
    • 178 *.ts files (52,477 lines of code)
    • 125 *.py files (24,886 lines of code)
    • 5 *.sh files (299 lines of code)
    • 3 *.proto files (66 lines of code)
  • " *.ts" is biggest, containing 67.51% of code.
  • " *.proto" is smallest, containing 0.08% of code.


*.ts52477 LOC (67%) 178 files
*.py24886 LOC (32%) 125 files
*.sh299 LOC (<1%) 5 files
*.proto66 LOC (<1%) 3 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 ".*/[.]gitattributes".
    • files with paths like ".*/package[.]json".
  • 8 files match defined criteria (263 lines of code, 0.2% vs. main code). All matches are in *.sh files.


*.sh263 LOC (100%) 8 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]patch".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 65 files match defined criteria (5,127 lines of code, 4.2% vs. main code):
    • 36 *.md files (4,008 lines of code)
    • 12 *.py files (282 lines of code)
    • 8 *.json files (274 lines of code)
    • 1 *.ipynb files (254 lines of code)
    • 4 *.js files (191 lines of code)
    • 2 *.sh files (94 lines of code)
    • 1 *.css files (20 lines of code)
    • 1 *.rst files (4 lines of code)
  • " *.md" is biggest, containing 78.17% of code.
  • " *.rst" is smallest, containing 0.08% of code.


*.md4008 LOC (78%) 36 files
*.py282 LOC (5%) 12 files
*.json274 LOC (5%) 8 files
*.ipynb254 LOC (4%) 1 files
*.js191 LOC (3%) 4 files
*.sh94 LOC (1%) 2 files
*.css20 LOC (<1%) 1 files
*.rst4 LOC (<1%) 1 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
  • *.py files are analyzed with PythonAnalyzer:
    • 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
    • Basic heuristic dependency analysis
  • *.rs files are analyzed with RustAnalyzer:
    • 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
  • *.proto 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
  • *.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
  • *.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
  • *.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
  • *.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)
  • *.toml 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
  • *.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
  • *.cfg files are analyzed with CfgAnalyzer:
    • 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
  • *.in files are analyzed with RustAnalyzer:
    • 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


2022-02-03 08:00