bazelbuild / bazel
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
txt
vcxproj
patch
pro
tpl
adb
in
filters
S
mak
cfg
properties
ads
cmakein
com
lds
spec
mk
wxs
csproj
gitattributes
mms
sas
ini
  • 56 extensions are included in analyses: java, sh, proto, txt, cc, md, bzl, py, h, html, c, yaml, xml, svg, vcxproj, patch, gradle, pro, css, tpl, cs, bat, js, scss, cpp, ps1, adb, in, yml, filters, bash, S, mak, cfg, asm, pas, properties, gitignore, ads, inc, cmakein, rst, com, json, lds, rb, m, spec, mk, mm, wxs, csproj, gitattributes, mms, sas, ini
  • 18 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/docs/.*" (Documentation) (165 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (8 files).
    • exclude files with path like ".*/debian/.*" (Distributions) (3 files).
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (1542 files).
    • exclude files with path like ".*font-?awesome\.(css|less|scss|styl)" (Font Awesome) (0 files).
    • exclude files with path like ".*/bootstrap[.](js|css|less|scss|styl)" (Bootstrap) (0 files).
    • exclude files with path like ".*/underscore\.js" (Underscore.js) (0 files).
    • exclude files with path like "(?i).*/jquery.*[.]js" (jQuery files) (0 files).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (0 files).
    • exclude files with path like ".*/proguard[.]pro" (ProGuard) (0 files).
    • exclude files with path like ".*/target/.*" (Compiled files) (0 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 ".*/dependencies/.*" (Dependencies) (2 files).
    • exclude files with path like ".*/cache/.*" (Caches) (12 files).
    • exclude files with path like ".*/testdata/.*" (Test data) (162 files).
    • exclude files with path like ".*[.]txt" (Text files) (97 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (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.

main491308 LOC (53%) 3951 files
test412017 LOC (45%) 1933 files
generated0 LOC (0%) 0 files
build and deployment3316 LOC (<1%) 55 files
other3325 LOC (<1%) 81 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
tpl
wxs
spec
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 3951 files match defined criteria (491,308 lines of code, 100.0% vs. main code):
    • 3,548 *.java files (431,896 lines of code)
    • 100 *.bzl files (23,070 lines of code)
    • 93 *.cc files (17,482 lines of code)
    • 34 *.proto files (6,177 lines of code)
    • 45 *.html files (3,244 lines of code)
    • 58 *.h files (3,206 lines of code)
    • 35 *.py files (3,189 lines of code)
    • 9 *.tpl files (986 lines of code)
    • 3 *.bash files (535 lines of code)
    • 8 *.scss files (461 lines of code)
    • 6 *.ps1 files (396 lines of code)
    • 1 *.m files (225 lines of code)
    • 3 *.c files (132 lines of code)
    • 2 *.inc files (117 lines of code)
    • 1 *.yml files (75 lines of code)
    • 1 *.wxs files (58 lines of code)
    • 1 *.spec files (35 lines of code)
    • 1 *.cfg files (20 lines of code)
    • 1 *.rb files (3 lines of code)
    • 1 *.mm files (1 lines of code)
  • " *.java" is biggest, containing 87.91% of code.
  • " *.mm" is smallest, containing 0% of code.


*.java431896 LOC (87%) 3548 files
*.bzl23070 LOC (4%) 100 files
*.cc17482 LOC (3%) 93 files
*.proto6177 LOC (1%) 34 files
*.html3244 LOC (<1%) 45 files
*.h3206 LOC (<1%) 58 files
*.py3189 LOC (<1%) 35 files
*.tpl986 LOC (<1%) 9 files
*.bash535 LOC (<1%) 3 files
*.scss461 LOC (<1%) 8 files
*.ps1396 LOC (<1%) 6 files
*.m225 LOC (<1%) 1 files
*.c132 LOC (<1%) 3 files
*.inc117 LOC (<1%) 2 files
*.yml75 LOC (<1%) 1 files
*.wxs58 LOC (<1%) 1 files
*.spec35 LOC (<1%) 1 files
*.cfg20 LOC (<1%) 1 files
*.rb3 LOC (<1%) 1 files
*.mm1 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
proto
lds
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 ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_tests[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 1933 files match defined criteria (412,017 lines of code, 83.9% vs. main code):
    • 1,516 *.java files (325,194 lines of code)
    • 234 *.sh files (55,125 lines of code)
    • 17 *.bzl files (11,127 lines of code)
    • 83 *.cc files (10,952 lines of code)
    • 49 *.py files (8,191 lines of code)
    • 2 *.bash files (651 lines of code)
    • 19 *.h files (439 lines of code)
    • 8 *.html files (156 lines of code)
    • 1 *.proto files (96 lines of code)
    • 1 *.ps1 files (39 lines of code)
    • 1 *.c files (36 lines of code)
    • 2 *.lds files (11 lines of code)
  • " *.java" is biggest, containing 78.93% of code.
  • " *.lds" is smallest, containing 0% of code.


*.java325194 LOC (78%) 1516 files
*.sh55125 LOC (13%) 234 files
*.bzl11127 LOC (2%) 17 files
*.cc10952 LOC (2%) 83 files
*.py8191 LOC (1%) 49 files
*.bash651 LOC (<1%) 2 files
*.h439 LOC (<1%) 19 files
*.html156 LOC (<1%) 8 files
*.proto96 LOC (<1%) 1 files
*.ps139 LOC (<1%) 1 files
*.c36 LOC (<1%) 1 files
*.lds11 LOC (<1%) 2 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 ".*[.]bat".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]mak".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*/build[.]xml".
    • files with paths like ".*[.]mk".
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/[.]gitattributes".
  • 55 files match defined criteria (3,316 lines of code, 0.7% vs. main code):
    • 52 *.sh files (3,253 lines of code)
    • 3 *.bat files (63 lines of code)
  • " *.sh" is biggest, containing 98.1% of code.
  • " *.bat" is smallest, containing 1.9% of code.


*.sh3253 LOC (98%) 52 files
*.bat63 LOC (1%) 3 files
Other Code
properties
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 ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]patch".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 81 files match defined criteria (3,325 lines of code, 0.7% vs. main code):
    • 28 *.md files (2,205 lines of code)
    • 7 *.svg files (331 lines of code)
    • 10 *.xml files (309 lines of code)
    • 12 *.java files (182 lines of code)
    • 3 *.sh files (71 lines of code)
    • 5 *.cc files (59 lines of code)
    • 1 *.bzl files (56 lines of code)
    • 3 *.cpp files (41 lines of code)
    • 7 *.py files (35 lines of code)
    • 3 *.h files (27 lines of code)
    • 1 *.json files (8 lines of code)
    • 1 *.properties files (1 lines of code)
  • " *.md" is biggest, containing 66.32% of code.
  • " *.properties" is smallest, containing 0.03% of code.


*.md2205 LOC (66%) 28 files
*.svg331 LOC (9%) 7 files
*.xml309 LOC (9%) 10 files
*.java182 LOC (5%) 12 files
*.sh71 LOC (2%) 3 files
*.cc59 LOC (1%) 5 files
*.bzl56 LOC (1%) 1 files
*.cpp41 LOC (1%) 3 files
*.py35 LOC (1%) 7 files
*.h27 LOC (<1%) 3 files
*.json8 LOC (<1%) 1 files
*.properties1 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)
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.bash files are analyzed with ShellAnalyzer:
    • 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
  • *.ps1 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
  • *.m 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
  • *.c files are analyzed with CStyleAnalyzer:
    • 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
  • *.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
  • *.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
  • *.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
  • *.spec 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
  • *.rb files are analyzed with RubyAnalyzer:
    • 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
    • Basic heuristic 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


2022-02-03 05:28