hhvm / hhvm-third-party
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
rl
txt
in
m4
txl
cmake
awk
vim
make
tex
  • 23 extensions are included in analyses: h, c, rl, cpp, html, txt, in, m4, sh, txl, cc, gitignore, cmake, md, bat, awk, pl, json, vim, make, pas, tex, rb
  • 4 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 ".*[.]m4" (stuff autogenerated by autoconf - still C deps) (10 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.

main191624 LOC (85%) 552 files
test17801 LOC (7%) 107 files
generated0 LOC (0%) 0 files
build and deployment624 LOC (<1%) 4 files
other15032 LOC (6%) 46 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
tex
rl
awk
cmake
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 552 files match defined criteria (191,624 lines of code, 100.0% vs. main code):
    • 176 *.c files (65,855 lines of code)
    • 227 *.h files (51,251 lines of code)
    • 58 *.cpp files (42,765 lines of code)
    • 52 *.html files (16,078 lines of code)
    • 21 *.in files (7,938 lines of code)
    • 1 *.tex files (3,099 lines of code)
    • 6 *.cc files (2,100 lines of code)
    • 1 *.rl files (1,064 lines of code)
    • 1 *.pas files (592 lines of code)
    • 2 *.pl files (464 lines of code)
    • 1 *.rb files (189 lines of code)
    • 2 *.awk files (128 lines of code)
    • 4 *.cmake files (101 lines of code)
  • " *.c" is biggest, containing 34.37% of code.
  • " *.cmake" is smallest, containing 0.05% of code.


*.c65855 LOC (34%) 176 files
*.h51251 LOC (26%) 227 files
*.cpp42765 LOC (22%) 58 files
*.html16078 LOC (8%) 52 files
*.in7938 LOC (4%) 21 files
*.tex3099 LOC (1%) 1 files
*.cc2100 LOC (1%) 6 files
*.rl1064 LOC (<1%) 1 files
*.pas592 LOC (<1%) 1 files
*.pl464 LOC (<1%) 2 files
*.rb189 LOC (<1%) 1 files
*.awk128 LOC (<1%) 2 files
*.cmake101 LOC (<1%) 4 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
rl
txl
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*[.][Tt]ests/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
  • 107 files match defined criteria (17,801 lines of code, 9.3% vs. main code):
    • 81 *.rl files (12,124 lines of code)
    • 8 *.c files (2,392 lines of code)
    • 7 *.txl files (1,771 lines of code)
    • 2 *.in files (1,054 lines of code)
    • 5 *.sh files (349 lines of code)
    • 4 *.h files (111 lines of code)
  • " *.rl" is biggest, containing 68.11% of code.
  • " *.h" is smallest, containing 0.62% of code.


*.rl12124 LOC (68%) 81 files
*.c2392 LOC (13%) 8 files
*.txl1771 LOC (9%) 7 files
*.in1054 LOC (5%) 2 files
*.sh349 LOC (1%) 5 files
*.h111 LOC (<1%) 4 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
make
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]make".
    • files with paths like ".*[.]bat".
  • 4 files match defined criteria (624 lines of code, 0.3% vs. main code):
    • 2 *.bat files (613 lines of code)
    • 1 *.sh files (7 lines of code)
    • 1 *.make files (4 lines of code)
  • " *.bat" is biggest, containing 98.24% of code.
  • " *.make" is smallest, containing 0.64% of code.


*.bat613 LOC (98%) 2 files
*.sh7 LOC (1%) 1 files
*.make4 LOC (<1%) 1 files
Other Code
txt
rl
in
vim
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]vim".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/README[.][a-z0-9]+".
  • 46 files match defined criteria (15,032 lines of code, 7.8% vs. main code):
    • 16 *.txt files (6,172 lines of code)
    • 7 *.cpp files (4,834 lines of code)
    • 5 *.c files (1,701 lines of code)
    • 12 *.rl files (1,484 lines of code)
    • 1 *.in files (635 lines of code)
    • 1 *.vim files (123 lines of code)
    • 1 *.json files (72 lines of code)
    • 3 *.md files (11 lines of code)
  • " *.txt" is biggest, containing 41.06% of code.
  • " *.md" is smallest, containing 0.07% of code.


*.txt6172 LOC (41%) 16 files
*.cpp4834 LOC (32%) 7 files
*.c1701 LOC (11%) 5 files
*.rl1484 LOC (9%) 12 files
*.in635 LOC (4%) 1 files
*.vim123 LOC (<1%) 1 files
*.json72 LOC (<1%) 1 files
*.md11 LOC (<1%) 3 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.tex 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
  • *.rl 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
  • *.pas files are analyzed with ObjectPascalAnalyzer:
    • 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
  • *.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
  • *.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
  • *.awk 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
  • *.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


2022-04-16 06:58