GerritCodeReview / gerrit
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
txt
soy
properties
prefs
proto
editorconfig
gitattributes
g
diff
launch
gitmodules
eslintignore
  • 29 extensions are included in analyses: java, ts, txt, js, soy, json, sh, scala, bzl, md, py, gitignore, xml, pl, html, properties, css, prefs, proto, sbt, editorconfig, go, gitattributes, yaml, g, diff, launch, gitmodules, eslintignore
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (30 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (1 file).
    • 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 ".*/cache/.*" (Caches) (94 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (210 files).
    • exclude files with path like ".*/prettify[.]js" (1 file).
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.

main446978 LOC (87%) 3855 files
test59186 LOC (11%) 291 files
generated18 LOC (<1%) 1 files
build and deployment1307 LOC (<1%) 16 files
other4489 LOC (<1%) 108 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
soy
proto
g
launch
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 3855 files match defined criteria (446,978 lines of code, 100.0% vs. main code):
    • 3,286 *.java files (351,622 lines of code)
    • 459 *.ts files (86,352 lines of code)
    • 22 *.bzl files (2,440 lines of code)
    • 47 *.soy files (2,338 lines of code)
    • 15 *.py files (1,665 lines of code)
    • 3 *.proto files (790 lines of code)
    • 2 *.go files (537 lines of code)
    • 2 *.pl files (388 lines of code)
    • 6 *.html files (283 lines of code)
    • 3 *.css files (208 lines of code)
    • 1 *.g files (178 lines of code)
    • 8 *.js files (160 lines of code)
    • 1 *.launch files (17 lines of code)
  • " *.java" is biggest, containing 78.67% of code.
  • " *.launch" is smallest, containing 0% of code.


*.java351622 LOC (78%) 3286 files
*.ts86352 LOC (19%) 459 files
*.bzl2440 LOC (<1%) 22 files
*.soy2338 LOC (<1%) 47 files
*.py1665 LOC (<1%) 15 files
*.proto790 LOC (<1%) 3 files
*.go537 LOC (<1%) 2 files
*.pl388 LOC (<1%) 2 files
*.html283 LOC (<1%) 6 files
*.css208 LOC (<1%) 3 files
*.g178 LOC (<1%) 1 files
*.js160 LOC (<1%) 8 files
*.launch17 LOC (<1%) 1 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 any line of content like ".*/simpletest/.*".
  • 291 files match defined criteria (59,186 lines of code, 13.2% vs. main code):
    • 175 *.ts files (36,391 lines of code)
    • 75 *.js files (21,417 lines of code)
    • 25 *.scala files (874 lines of code)
    • 12 *.sh files (320 lines of code)
    • 1 *.pl files (145 lines of code)
    • 1 *.py files (21 lines of code)
    • 2 *.sbt files (18 lines of code)
  • " *.ts" is biggest, containing 61.49% of code.
  • " *.sbt" is smallest, containing 0.03% of code.


*.ts36391 LOC (61%) 175 files
*.js21417 LOC (36%) 75 files
*.scala874 LOC (1%) 25 files
*.sh320 LOC (<1%) 12 files
*.pl145 LOC (<1%) 1 files
*.py21 LOC (<1%) 1 files
*.sbt18 LOC (<1%) 2 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 (18 lines of code, 0.0% vs. main code). All matches are in *.json files.


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


*.sh1307 LOC (100%) 16 files
Other Code
properties
diff
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 ".*[.]properties".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*[.]diff".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 108 files match defined criteria (4,489 lines of code, 1.0% vs. main code):
    • 19 *.md files (1,137 lines of code)
    • 45 *.json files (718 lines of code)
    • 11 *.xml files (509 lines of code)
    • 1 *.css files (412 lines of code)
    • 4 *.java files (364 lines of code)
    • 5 *.properties files (354 lines of code)
    • 9 *.js files (336 lines of code)
    • 7 *.pl files (319 lines of code)
    • 2 *.ts files (173 lines of code)
    • 1 *.py files (80 lines of code)
    • 3 *.sh files (47 lines of code)
    • 1 *.diff files (40 lines of code)
  • " *.md" is biggest, containing 25.33% of code.
  • " *.diff" is smallest, containing 0.89% of code.


*.md1137 LOC (25%) 19 files
*.json718 LOC (15%) 45 files
*.xml509 LOC (11%) 11 files
*.css412 LOC (9%) 1 files
*.java364 LOC (8%) 4 files
*.properties354 LOC (7%) 5 files
*.js336 LOC (7%) 9 files
*.pl319 LOC (7%) 7 files
*.ts173 LOC (3%) 2 files
*.py80 LOC (1%) 1 files
*.sh47 LOC (1%) 3 files
*.diff40 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.soy 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
  • *.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
  • *.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
  • *.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
  • *.pl files are analyzed with PerlAnalyzer:
    • 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
  • *.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
  • *.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
  • *.g 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
  • *.launch files are analyzed with XmlAnalyzer:
    • 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


2022-02-03 05:45