bazelbuild / bazel-buildfarm
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
patch
properties
spec
txt
liquid
rake
  • 23 extensions are included in analyses: java, md, scss, proto, html, sh, patch, yaml, bzl, properties, js, xml, yml, css, spec, json, c, gitignore, txt, liquid, py, svg, rake
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (15 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (27 files).
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (6 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.

main55739 LOC (82%) 346 files
test11191 LOC (16%) 76 files
generated0 LOC (0%) 0 files
build and deployment87 LOC (<1%) 2 files
other611 LOC (<1%) 16 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
spec
rake
liquid
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 346 files match defined criteria (55,739 lines of code, 100.0% vs. main code):
    • 252 *.java files (35,467 lines of code)
    • 2 *.css files (9,593 lines of code)
    • 21 *.proto files (6,135 lines of code)
    • 31 *.scss files (2,197 lines of code)
    • 17 *.html files (777 lines of code)
    • 5 *.js files (553 lines of code)
    • 6 *.yaml files (350 lines of code)
    • 3 *.bzl files (309 lines of code)
    • 2 *.spec files (93 lines of code)
    • 1 *.py files (92 lines of code)
    • 1 *.rake files (85 lines of code)
    • 1 *.yml files (47 lines of code)
    • 2 *.c files (33 lines of code)
    • 2 *.liquid files (8 lines of code)
  • " *.java" is biggest, containing 63.63% of code.
  • " *.liquid" is smallest, containing 0.01% of code.


*.java35467 LOC (63%) 252 files
*.css9593 LOC (17%) 2 files
*.proto6135 LOC (11%) 21 files
*.scss2197 LOC (3%) 31 files
*.html777 LOC (1%) 17 files
*.js553 LOC (<1%) 5 files
*.yaml350 LOC (<1%) 6 files
*.bzl309 LOC (<1%) 3 files
*.spec93 LOC (<1%) 2 files
*.py92 LOC (<1%) 1 files
*.rake85 LOC (<1%) 1 files
*.yml47 LOC (<1%) 1 files
*.c33 LOC (<1%) 2 files
*.liquid8 LOC (<1%) 2 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 ".*_test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 76 files match defined criteria (11,191 lines of code, 20.1% vs. main code):
    • 73 *.java files (10,961 lines of code)
    • 2 *.bzl files (206 lines of code)
    • 1 *.sh files (24 lines of code)
  • " *.java" is biggest, containing 97.94% of code.
  • " *.sh" is smallest, containing 0.21% of code.


*.java10961 LOC (97%) 73 files
*.bzl206 LOC (1%) 2 files
*.sh24 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/pom[.]xml".
  • 2 files match defined criteria (87 lines of code, 0.2% vs. main code). All matches are in *.sh files.


*.sh87 LOC (100%) 2 files
Other Code
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]patch".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 16 files match defined criteria (611 lines of code, 1.1% vs. main code):
    • 2 *.xml files (272 lines of code)
    • 5 *.md files (129 lines of code)
    • 1 *.java files (73 lines of code)
    • 1 *.json files (72 lines of code)
    • 5 *.properties files (36 lines of code)
    • 1 *.sh files (28 lines of code)
    • 1 *.svg files (1 lines of code)
  • " *.xml" is biggest, containing 44.52% of code.
  • " *.svg" is smallest, containing 0.16% of code.


*.xml272 LOC (44%) 2 files
*.md129 LOC (21%) 5 files
*.java73 LOC (11%) 1 files
*.json72 LOC (11%) 1 files
*.properties36 LOC (5%) 5 files
*.sh28 LOC (4%) 1 files
*.svg1 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)
  • *.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
  • *.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
  • *.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
  • *.yaml 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
  • *.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
  • *.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
  • *.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
  • *.rake 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
  • *.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
  • *.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
  • *.liquid 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


2022-02-03 05:30