firebase / boringSSL-SwiftPM
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
S
s
in
cmake
obj
mod
gn
clang-format
lds
  • 25 extensions are included in analyses: c, h, json, txt, cc, S, go, pl, py, asm, s, md, sh, in, cmake, bzl, gitignore, obj, css, mod, yml, swift, gn, clang-format, lds
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (4 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 ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (287 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (0 files).
    • exclude files with path like ".*/testdata/.*" (Test data) (34 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (59 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.

main479138 LOC (97%) 806 files
test8624 LOC (1%) 32 files
generated689 LOC (<1%) 1 files
build and deployment165 LOC (<1%) 4 files
other2492 LOC (<1%) 17 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
s
cmake
lds
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 806 files match defined criteria (479,138 lines of code, 100.0% vs. main code):
    • 112 *.s files (187,758 lines of code)
    • 331 *.c files (77,379 lines of code)
    • 30 *.asm files (62,281 lines of code)
    • 55 *.pl files (53,525 lines of code)
    • 138 *.h files (47,111 lines of code)
    • 75 *.cc files (30,501 lines of code)
    • 51 *.go files (18,944 lines of code)
    • 9 *.py files (1,299 lines of code)
    • 2 *.cmake files (190 lines of code)
    • 1 *.swift files (69 lines of code)
    • 1 *.css files (57 lines of code)
    • 1 *.lds files (24 lines of code)
  • " *.s" is biggest, containing 39.19% of code.
  • " *.lds" is smallest, containing 0.01% of code.


*.s187758 LOC (39%) 112 files
*.c77379 LOC (16%) 331 files
*.asm62281 LOC (12%) 30 files
*.pl53525 LOC (11%) 55 files
*.h47111 LOC (9%) 138 files
*.cc30501 LOC (6%) 75 files
*.go18944 LOC (3%) 51 files
*.py1299 LOC (<1%) 9 files
*.cmake190 LOC (<1%) 2 files
*.swift69 LOC (<1%) 1 files
*.css57 LOC (<1%) 1 files
*.lds24 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
s
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*[-]tests[-].*".
    • files with paths like ".*/test_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 32 files match defined criteria (8,624 lines of code, 1.8% vs. main code):
    • 10 *.s files (4,939 lines of code)
    • 15 *.go files (2,400 lines of code)
    • 2 *.asm files (623 lines of code)
    • 1 *.bzl files (331 lines of code)
    • 2 *.c files (248 lines of code)
    • 2 *.sh files (83 lines of code)
  • " *.s" is biggest, containing 57.27% of code.
  • " *.sh" is smallest, containing 0.96% of code.


*.s4939 LOC (57%) 10 files
*.go2400 LOC (27%) 15 files
*.asm623 LOC (7%) 2 files
*.bzl331 LOC (3%) 1 files
*.c248 LOC (2%) 2 files
*.sh83 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 ".*[.]generated[.][a-zA-Z]+".
  • 1 file matches defined criteria (689 lines of code, 0.1% vs. main code). All matches are in *.bzl files.


*.bzl689 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".
  • 4 files match defined criteria (165 lines of code, 0.0% vs. main code). All matches are in *.sh files.


*.sh165 LOC (100%) 4 files
Other Code
mod
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 ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/go[.]mod".
  • 17 files match defined criteria (2,492 lines of code, 0.5% vs. main code):
    • 13 *.md files (1,412 lines of code)
    • 3 *.json files (1,074 lines of code)
    • 1 *.mod files (6 lines of code)
  • " *.md" is biggest, containing 56.66% of code.
  • " *.mod" is smallest, containing 0.24% of code.


*.md1412 LOC (56%) 13 files
*.json1074 LOC (43%) 3 files
*.mod6 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.s 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
  • *.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
  • *.asm 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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.cmake 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
  • *.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
  • *.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
  • *.lds 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:41