facebookexperimental / eden
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
t
txt
snap
cmake
po
pyi
patch
vim
pyx
in
el
editorconfig
mo
clang-format
  • 35 extensions are included in analyses: rs, py, t, toml, cpp, h, txt, snap, md, thrift, sh, c, sql, rst, cmake, svg, po, yml, gitignore, pyi, patch, css, vim, json, pyx, bat, in, js, el, ps1, editorconfig, ipynb, html, mo, clang-format
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (23 files).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (7 files).
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (26 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (19 files).
    • exclude files with path like ".*/deps/.*" (Dependencies) (6 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.

main611142 LOC (73%) 3366 files
test208235 LOC (24%) 1564 files
generated0 LOC (0%) 0 files
build and deployment615 LOC (<1%) 11 files
other13245 LOC (1%) 148 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
po
cmake
el
pyx
pyi
in
mo
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 3366 files match defined criteria (611,142 lines of code, 100.0% vs. main code):
    • 1,760 *.rs files (349,544 lines of code)
    • 543 *.py files (155,631 lines of code)
    • 220 *.cpp files (46,221 lines of code)
    • 276 *.h files (21,063 lines of code)
    • 414 *.toml files (10,613 lines of code)
    • 26 *.c files (9,701 lines of code)
    • 2 *.po files (7,397 lines of code)
    • 40 *.thrift files (2,932 lines of code)
    • 28 *.cmake files (2,617 lines of code)
    • 5 *.css files (1,456 lines of code)
    • 3 *.js files (1,202 lines of code)
    • 1 *.el files (1,125 lines of code)
    • 4 *.pyx files (720 lines of code)
    • 11 *.pyi files (382 lines of code)
    • 24 *.sql files (353 lines of code)
    • 1 *.ps1 files (99 lines of code)
    • 3 *.in files (45 lines of code)
    • 4 *.yml files (32 lines of code)
    • 1 *.mo files (9 lines of code)
  • " *.rs" is biggest, containing 57.2% of code.
  • " *.mo" is smallest, containing 0% of code.


*.rs349544 LOC (57%) 1760 files
*.py155631 LOC (25%) 543 files
*.cpp46221 LOC (7%) 220 files
*.h21063 LOC (3%) 276 files
*.toml10613 LOC (1%) 414 files
*.c9701 LOC (1%) 26 files
*.po7397 LOC (1%) 2 files
*.thrift2932 LOC (<1%) 40 files
*.cmake2617 LOC (<1%) 28 files
*.css1456 LOC (<1%) 5 files
*.js1202 LOC (<1%) 3 files
*.el1125 LOC (<1%) 1 files
*.pyx720 LOC (<1%) 4 files
*.pyi382 LOC (<1%) 11 files
*.sql353 LOC (<1%) 24 files
*.ps199 LOC (<1%) 1 files
*.in45 LOC (<1%) 3 files
*.yml32 LOC (<1%) 4 files
*.mo9 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
t
snap
el
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 ".*_tests[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*[-]tests/.*".
    • files with paths like ".*[-]tests[-].*".
    • files with paths like ".*__tests__.*".
    • files with paths like ".*[.]snap".
    • files with paths like ".*/test[-]data/.*".
    • files with paths like ".*/[Ss]pecs/.*".
  • 1564 files match defined criteria (208,235 lines of code, 34.1% vs. main code):
    • 856 *.t files (119,985 lines of code)
    • 410 *.py files (38,440 lines of code)
    • 80 *.rs files (22,909 lines of code)
    • 112 *.cpp files (22,731 lines of code)
    • 29 *.sh files (3,309 lines of code)
    • 10 *.toml files (314 lines of code)
    • 59 *.snap files (295 lines of code)
    • 4 *.sql files (131 lines of code)
    • 3 *.h files (73 lines of code)
    • 1 *.el files (48 lines of code)
  • " *.t" is biggest, containing 57.62% of code.
  • " *.el" is smallest, containing 0.02% of code.


*.t119985 LOC (57%) 856 files
*.py38440 LOC (18%) 410 files
*.rs22909 LOC (11%) 80 files
*.cpp22731 LOC (10%) 112 files
*.sh3309 LOC (1%) 29 files
*.toml314 LOC (<1%) 10 files
*.snap295 LOC (<1%) 59 files
*.sql131 LOC (<1%) 4 files
*.h73 LOC (<1%) 3 files
*.el48 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 ".*[.]bat".
  • 11 files match defined criteria (615 lines of code, 0.1% vs. main code):
    • 8 *.sh files (427 lines of code)
    • 3 *.bat files (188 lines of code)
  • " *.sh" is biggest, containing 69.43% of code.
  • " *.bat" is smallest, containing 30.57% of code.


*.sh427 LOC (69%) 8 files
*.bat188 LOC (30%) 3 files
Other Code
txt
vim
patch
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 ".*[.]json".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*[.]vim".
    • files with paths like ".*[.]patch".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]svg".
  • 148 files match defined criteria (13,245 lines of code, 2.2% vs. main code):
    • 72 *.txt files (5,630 lines of code)
    • 5 *.vim files (2,378 lines of code)
    • 28 *.rst files (2,301 lines of code)
    • 23 *.md files (1,378 lines of code)
    • 8 *.patch files (1,063 lines of code)
    • 5 *.json files (335 lines of code)
    • 6 *.rs files (142 lines of code)
    • 1 *.toml files (18 lines of code)
  • " *.txt" is biggest, containing 42.51% of code.
  • " *.toml" is smallest, containing 0.14% of code.


*.txt5630 LOC (42%) 72 files
*.vim2378 LOC (17%) 5 files
*.rst2301 LOC (17%) 28 files
*.md1378 LOC (10%) 23 files
*.patch1063 LOC (8%) 8 files
*.json335 LOC (2%) 5 files
*.rs142 LOC (1%) 6 files
*.toml18 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.rs 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
  • *.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
  • *.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
  • *.toml 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
  • *.po 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
  • *.thrift files are analyzed with ThriftAnalyzer:
    • 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
  • *.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
  • *.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
  • *.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
  • *.el 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
  • *.pyx 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
  • *.pyi 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
  • *.sql files are analyzed with SqlAnalyzer:
    • 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
  • *.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
  • *.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
  • *.mo 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-15 05:58