tensorflow / io
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
Rd
tpl
txt
patch
Rmd
proto
gitattributes
orc
obj
  • 30 extensions are included in analyses: py, cc, h, html, sh, Rd, md, ipynb, R, tpl, bzl, txt, js, json, yml, patch, css, Dockerfile, yaml, swift, sql, gitignore, Rmd, avsc, proto, gitattributes, orc, svg, go, obj
  • 9 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (28 files).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (0 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (13 files).
    • exclude files with path like ".*/vignettes/.*" (R packages) (1 file).
    • exclude files with path like ".*/docs/.*" (Documentation) (58 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) (6 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.

main45458 LOC (75%) 308 files
test12872 LOC (21%) 80 files
generated0 LOC (0%) 0 files
build and deployment11 LOC (<1%) 1 files
other2196 LOC (3%) 41 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
tpl
rmd
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 308 files match defined criteria (45,458 lines of code, 100.0% vs. main code):
    • 129 *.cc files (30,099 lines of code)
    • 115 *.py files (10,484 lines of code)
    • 39 *.h files (3,300 lines of code)
    • 11 *.r files (569 lines of code)
    • 2 *.swift files (356 lines of code)
    • 1 *.tpl files (195 lines of code)
    • 1 *.go files (128 lines of code)
    • 3 *.dockerfile files (90 lines of code)
    • 2 *.bzl files (90 lines of code)
    • 1 *.css files (58 lines of code)
    • 1 *.yml files (44 lines of code)
    • 1 *.rmd files (24 lines of code)
    • 1 *.proto files (12 lines of code)
    • 1 *.js files (9 lines of code)
  • " *.cc" is biggest, containing 66.21% of code.
  • " *.js" is smallest, containing 0.02% of code.


*.cc30099 LOC (66%) 129 files
*.py10484 LOC (23%) 115 files
*.h3300 LOC (7%) 39 files
*.r569 LOC (1%) 11 files
*.swift356 LOC (<1%) 2 files
*.tpl195 LOC (<1%) 1 files
*.go128 LOC (<1%) 1 files
*.dockerfile90 LOC (<1%) 3 files
*.bzl90 LOC (<1%) 2 files
*.css58 LOC (<1%) 1 files
*.yml44 LOC (<1%) 1 files
*.rmd24 LOC (<1%) 1 files
*.proto12 LOC (<1%) 1 files
*.js9 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
obj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/test_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 80 files match defined criteria (12,872 lines of code, 28.3% vs. main code):
    • 59 *.py files (12,348 lines of code)
    • 16 *.sh files (364 lines of code)
    • 3 *.r files (88 lines of code)
    • 1 *.cc files (66 lines of code)
    • 1 *.obj files (6 lines of code)
  • " *.py" is biggest, containing 95.93% of code.
  • " *.obj" is smallest, containing 0.05% of code.


*.py12348 LOC (95%) 59 files
*.sh364 LOC (2%) 16 files
*.r88 LOC (<1%) 3 files
*.cc66 LOC (<1%) 1 files
*.obj6 LOC (<1%) 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 ".*/[.]gitattributes".
  • 1 file matches defined criteria (11 lines of code, 0.0% vs. main code). All matches are in *.sh files.


*.sh11 LOC (100%) 1 files
Other Code
rd
patch
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 ".*/[Mm]an/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 41 files match defined criteria (2,196 lines of code, 4.8% vs. main code):
    • 13 *.md files (1,311 lines of code)
    • 20 *.rd files (527 lines of code)
    • 5 *.json files (330 lines of code)
    • 1 *.patch files (12 lines of code)
    • 1 *.avsc files (8 lines of code)
    • 1 *.sql files (8 lines of code)
  • " *.md" is biggest, containing 59.7% of code.
  • " *.sql" is smallest, containing 0.36% of code.


*.md1311 LOC (59%) 13 files
*.rd527 LOC (23%) 20 files
*.json330 LOC (15%) 5 files
*.patch12 LOC (<1%) 1 files
*.avsc8 LOC (<1%) 1 files
*.sql8 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.cc 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
  • *.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
  • *.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
  • *.r files are analyzed with RAnalyzer:
    • 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
  • *.tpl 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
  • *.go files are analyzed with GoLangAnalyzer:
    • 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
  • *.dockerfile 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
  • *.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
  • *.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
  • *.rmd 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
  • *.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
  • *.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


2022-02-03 08:09