google / gapid
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
cfg
in
glsl
vert
frag
prefs
patch
txt
tpl
project
clang-format
wxs
TXT
plist
desktop
classpath
obj
  • 38 extensions are included in analyses: go, java, h, cpp, proto, inc, bzl, md, cfg, js, sh, json, in, glsl, vert, html, frag, bat, gitignore, prefs, mm, cc, patch, xml, txt, tpl, css, project, py, MD, clang-format, wxs, TXT, plist, desktop, classpath, svg, obj
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (11 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (1 file).
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (50 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) (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.

main222590 LOC (83%) 1697 files
test40325 LOC (15%) 405 files
generated0 LOC (0%) 0 files
build and deployment588 LOC (<1%) 14 files
other2469 LOC (<1%) 29 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
in
glsl
wxs
tpl
obj
cfg
vert
desktop
frag
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1697 files match defined criteria (222,590 lines of code, 100.0% vs. main code):
    • 999 *.go files (129,799 lines of code)
    • 271 *.java files (46,081 lines of code)
    • 144 *.cpp files (24,567 lines of code)
    • 152 *.h files (8,549 lines of code)
    • 40 *.proto files (5,905 lines of code)
    • 24 *.bzl files (2,608 lines of code)
    • 2 *.html files (2,150 lines of code)
    • 17 *.inc files (1,452 lines of code)
    • 7 *.in files (386 lines of code)
    • 3 *.mm files (303 lines of code)
    • 7 *.glsl files (254 lines of code)
    • 1 *.wxs files (106 lines of code)
    • 2 *.cc files (87 lines of code)
    • 2 *.tpl files (86 lines of code)
    • 1 *.obj files (85 lines of code)
    • 19 *.cfg files (44 lines of code)
    • 1 *.vert files (36 lines of code)
    • 1 *.md files (35 lines of code)
    • 1 *.js files (25 lines of code)
    • 1 *.py files (13 lines of code)
    • 1 *.desktop files (10 lines of code)
    • 1 *.frag files (9 lines of code)
  • " *.go" is biggest, containing 58.31% of code.
  • " *.frag" is smallest, containing 0% of code.


*.go129799 LOC (58%) 999 files
*.java46081 LOC (20%) 271 files
*.cpp24567 LOC (11%) 144 files
*.h8549 LOC (3%) 152 files
*.proto5905 LOC (2%) 40 files
*.bzl2608 LOC (1%) 24 files
*.html2150 LOC (<1%) 2 files
*.inc1452 LOC (<1%) 17 files
*.in386 LOC (<1%) 7 files
*.mm303 LOC (<1%) 3 files
*.glsl254 LOC (<1%) 7 files
*.wxs106 LOC (<1%) 1 files
*.cc87 LOC (<1%) 2 files
*.tpl86 LOC (<1%) 2 files
*.obj85 LOC (<1%) 1 files
*.cfg44 LOC (<1%) 19 files
*.vert36 LOC (<1%) 1 files
*.md35 LOC (<1%) 1 files
*.js25 LOC (<1%) 1 files
*.py13 LOC (<1%) 1 files
*.desktop10 LOC (<1%) 1 files
*.frag9 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
proto
vert
frag
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 405 files match defined criteria (40,325 lines of code, 18.1% vs. main code):
    • 341 *.go files (34,281 lines of code)
    • 22 *.cpp files (3,349 lines of code)
    • 12 *.proto files (981 lines of code)
    • 15 *.js files (660 lines of code)
    • 4 *.vert files (271 lines of code)
    • 4 *.frag files (257 lines of code)
    • 1 *.sh files (245 lines of code)
    • 2 *.h files (157 lines of code)
    • 1 *.css files (65 lines of code)
    • 3 *.html files (59 lines of code)
  • " *.go" is biggest, containing 85.01% of code.
  • " *.html" is smallest, containing 0.15% of code.


*.go34281 LOC (85%) 341 files
*.cpp3349 LOC (8%) 22 files
*.proto981 LOC (2%) 12 files
*.js660 LOC (1%) 15 files
*.vert271 LOC (<1%) 4 files
*.frag257 LOC (<1%) 4 files
*.sh245 LOC (<1%) 1 files
*.h157 LOC (<1%) 2 files
*.css65 LOC (<1%) 1 files
*.html59 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]bat".
    • files with paths like ".*/AndroidManifest[.]xml".
  • 14 files match defined criteria (588 lines of code, 0.3% vs. main code):
    • 10 *.sh files (352 lines of code)
    • 4 *.bat files (236 lines of code)
  • " *.sh" is biggest, containing 59.86% of code.
  • " *.bat" is smallest, containing 40.14% of code.


*.sh352 LOC (59%) 10 files
*.bat236 LOC (40%) 4 files
Other Code
plist
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]plist".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]patch".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 29 files match defined criteria (2,469 lines of code, 1.1% vs. main code):
    • 16 *.md files (1,724 lines of code)
    • 7 *.json files (641 lines of code)
    • 1 *.plist files (57 lines of code)
    • 3 *.go files (29 lines of code)
    • 2 *.xml files (18 lines of code)
  • " *.md" is biggest, containing 69.83% of code.
  • " *.xml" is smallest, containing 0.73% of code.


*.md1724 LOC (69%) 16 files
*.json641 LOC (25%) 7 files
*.plist57 LOC (2%) 1 files
*.go29 LOC (1%) 3 files
*.xml18 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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)
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.inc files are analyzed with PhpAnalyzer:
    • 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
  • *.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
  • *.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
  • *.glsl 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
  • *.wxs 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
  • *.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
  • *.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
  • *.obj 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
  • *.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
  • *.vert 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
  • *.md 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
  • *.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
  • *.desktop 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
  • *.frag 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-01-30 12:10