facebook / wdt
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
tcl
in
txt
clang-format
  • 12 extensions are included in analyses: cpp, h, sh, py, tcl, md, in, txt, clang-format, json, yml, inc
  • 3 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (2 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).
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.

main15380 LOC (71%) 81 files
test4897 LOC (22%) 54 files
generated0 LOC (0%) 0 files
build and deployment248 LOC (1%) 10 files
other925 LOC (4%) 7 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
tcl
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 81 files match defined criteria (15,380 lines of code, 100.0% vs. main code):
    • 35 *.cpp files (11,215 lines of code)
    • 37 *.h files (3,384 lines of code)
    • 5 *.tcl files (575 lines of code)
    • 1 *.inc files (159 lines of code)
    • 3 *.in files (47 lines of code)
  • " *.cpp" is biggest, containing 72.92% of code.
  • " *.in" is smallest, containing 0.31% of code.


*.cpp11215 LOC (72%) 35 files
*.h3384 LOC (22%) 37 files
*.tcl575 LOC (3%) 5 files
*.inc159 LOC (1%) 1 files
*.in47 LOC (<1%) 3 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 ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/test_.*".
  • 54 files match defined criteria (4,897 lines of code, 31.8% vs. main code):
    • 19 *.cpp files (2,427 lines of code)
    • 20 *.sh files (1,739 lines of code)
    • 14 *.py files (714 lines of code)
    • 1 *.h files (17 lines of code)
  • " *.cpp" is biggest, containing 49.56% of code.
  • " *.h" is smallest, containing 0.35% of code.


*.cpp2427 LOC (49%) 19 files
*.sh1739 LOC (35%) 20 files
*.py714 LOC (14%) 14 files
*.h17 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 ".*[.]sh".
  • 10 files match defined criteria (248 lines of code, 1.6% vs. main code). All matches are in *.sh files.


*.sh248 LOC (100%) 10 files
Other Code
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]json".
    • files with paths like ".*/README[.][a-z0-9]+".
  • 7 files match defined criteria (925 lines of code, 6.0% vs. main code):
    • 4 *.md files (466 lines of code)
    • 2 *.txt files (387 lines of code)
    • 1 *.json files (72 lines of code)
  • " *.md" is biggest, containing 50.38% of code.
  • " *.json" is smallest, containing 7.78% of code.


*.md466 LOC (50%) 4 files
*.txt387 LOC (41%) 2 files
*.json72 LOC (7%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.tcl 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
  • *.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


2022-04-14 22:54