facebookincubator / cinder
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
vcxproj
wxs
filters
wixproj
in
wxl
props
nuspec
m4
s
cmake
plist
proj
pyi
pck
clang-format
natvis
targets
pyw
gitattributes
ini
ps
dockerignore
hs
patch
vbs
mak
man
cfg
fish
babelrc
lisp
pro
xsl
command
csh
prettierignore
  • 64 extensions are included in analyses: py, h, rst, c, cpp, txt, cc, vcxproj, xml, wxs, filters, yml, js, md, bat, wixproj, sh, in, html, svg, css, wxl, json, props, d, m, nuspec, m4, s, cmake, ps1, inc, plist, gitignore, proj, pyi, pck, clang-format, natvis, targets, pyw, gitattributes, ini, ps, dockerignore, hs, patch, vbs, mak, man, cfg, hpp, toml, fish, asm, psm1, babelrc, lisp, pro, xsl, go, command, csh, prettierignore
  • 9 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (59 files).
    • exclude files with path like ".*/dist/.*" (Distributions) (2 files).
    • exclude files with path like ".*[.]m4" (stuff autogenerated by autoconf - still C deps) (5 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) (547 files).
    • exclude files with path like "(?i).*/jquery.*[.]js" (jQuery files) (0 files).
    • exclude files with path like ".*jquery[.].*[.]js" (jQuery library) (0 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (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.

main774158 LOC (55%) 2231 files
test368091 LOC (26%) 1444 files
generated399 LOC (<1%) 1 files
build and deployment1983 LOC (<1%) 43 files
other262912 LOC (18%) 844 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
vcxproj
in
filters
wxs
props
wixproj
lisp
man
proj
wxl
targets
pyi
fish
command
csh
pro
pyw
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 2231 files match defined criteria (774,158 lines of code, 100.0% vs. main code):
    • 328 *.c files (320,502 lines of code)
    • 1,015 *.py files (247,858 lines of code)
    • 523 *.h files (136,935 lines of code)
    • 116 *.cpp files (46,437 lines of code)
    • 47 *.vcxproj files (6,101 lines of code)
    • 15 *.in files (5,464 lines of code)
    • 37 *.filters files (2,166 lines of code)
    • 47 *.wxs files (1,648 lines of code)
    • 8 *.html files (1,244 lines of code)
    • 7 *.js files (661 lines of code)
    • 7 *.m files (635 lines of code)
    • 8 *.props files (585 lines of code)
    • 24 *.wixproj files (584 lines of code)
    • 1 *.lisp files (583 lines of code)
    • 5 *.inc files (576 lines of code)
    • 1 *.man files (556 lines of code)
    • 5 *.ps1 files (483 lines of code)
    • 4 *.proj files (288 lines of code)
    • 10 *.wxl files (181 lines of code)
    • 2 *.targets files (173 lines of code)
    • 4 *.pyi files (169 lines of code)
    • 1 *.fish files (62 lines of code)
    • 1 *.asm files (44 lines of code)
    • 1 *.psm1 files (41 lines of code)
    • 3 *.d files (35 lines of code)
    • 1 *.command files (32 lines of code)
    • 1 *.csh files (28 lines of code)
    • 2 *.yml files (26 lines of code)
    • 1 *.pro files (24 lines of code)
    • 2 *.pyw files (17 lines of code)
    • 1 *.cfg files (9 lines of code)
    • 1 *.toml files (6 lines of code)
    • 1 *.xml files (4 lines of code)
    • 1 *.css files (1 lines of code)
  • " *.c" is biggest, containing 41.4% of code.
  • " *.css" is smallest, containing 0% of code.


*.c320502 LOC (41%) 328 files
*.py247858 LOC (32%) 1015 files
*.h136935 LOC (17%) 523 files
*.cpp46437 LOC (5%) 116 files
*.vcxproj6101 LOC (<1%) 47 files
*.in5464 LOC (<1%) 15 files
*.filters2166 LOC (<1%) 37 files
*.wxs1648 LOC (<1%) 47 files
*.html1244 LOC (<1%) 8 files
*.js661 LOC (<1%) 7 files
*.m635 LOC (<1%) 7 files
*.props585 LOC (<1%) 8 files
*.wixproj584 LOC (<1%) 24 files
*.lisp583 LOC (<1%) 1 files
*.inc576 LOC (<1%) 5 files
*.man556 LOC (<1%) 1 files
*.ps1483 LOC (<1%) 5 files
*.proj288 LOC (<1%) 4 files
*.wxl181 LOC (<1%) 10 files
*.targets173 LOC (<1%) 2 files
*.pyi169 LOC (<1%) 4 files
*.fish62 LOC (<1%) 1 files
*.asm44 LOC (<1%) 1 files
*.psm141 LOC (<1%) 1 files
*.d35 LOC (<1%) 3 files
*.command32 LOC (<1%) 1 files
*.csh28 LOC (<1%) 1 files
*.yml26 LOC (<1%) 2 files
*.pro24 LOC (<1%) 1 files
*.pyw17 LOC (<1%) 2 files
*.cfg9 LOC (<1%) 1 files
*.toml6 LOC (<1%) 1 files
*.xml4 LOC (<1%) 1 files
*.css1 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
pck
vcxproj
wxs
wixproj
filters
wxl
xsl
vbs
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*[-]tests[-].*".
  • 1444 files match defined criteria (368,091 lines of code, 47.5% vs. main code):
    • 1,311 *.py files (352,285 lines of code)
    • 46 *.cpp files (10,997 lines of code)
    • 3 *.pck files (1,899 lines of code)
    • 1 *.c files (861 lines of code)
    • 2 *.html files (699 lines of code)
    • 56 *.xml files (328 lines of code)
    • 3 *.h files (281 lines of code)
    • 2 *.js files (158 lines of code)
    • 3 *.sh files (147 lines of code)
    • 1 *.vcxproj files (112 lines of code)
    • 1 *.bat files (101 lines of code)
    • 4 *.wxs files (70 lines of code)
    • 3 *.wixproj files (64 lines of code)
    • 4 *.d files (55 lines of code)
    • 1 *.filters files (21 lines of code)
    • 1 *.wxl files (7 lines of code)
    • 1 *.xsl files (5 lines of code)
    • 1 *.vbs files (1 lines of code)
  • " *.py" is biggest, containing 95.71% of code.
  • " *.vbs" is smallest, containing 0% of code.


*.py352285 LOC (95%) 1311 files
*.cpp10997 LOC (2%) 46 files
*.pck1899 LOC (<1%) 3 files
*.c861 LOC (<1%) 1 files
*.html699 LOC (<1%) 2 files
*.xml328 LOC (<1%) 56 files
*.h281 LOC (<1%) 3 files
*.js158 LOC (<1%) 2 files
*.sh147 LOC (<1%) 3 files
*.vcxproj112 LOC (<1%) 1 files
*.bat101 LOC (<1%) 1 files
*.wxs70 LOC (<1%) 4 files
*.wixproj64 LOC (<1%) 3 files
*.d55 LOC (<1%) 4 files
*.filters21 LOC (<1%) 1 files
*.wxl7 LOC (<1%) 1 files
*.xsl5 LOC (<1%) 1 files
*.vbs1 LOC (<1%) 1 files
Generated Code
Automatically generated files, not manually changed after generation.
ps
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.](ps|eps|pfa)".
  • 1 file matches defined criteria (399 lines of code, 0.1% vs. main code). All matches are in *.ps files.


*.ps399 LOC (100%) 1 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
nuspec
mak
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]mak".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]nuspec".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/[.]gitattributes".
  • 43 files match defined criteria (1,983 lines of code, 0.3% vs. main code):
    • 31 *.bat files (1,678 lines of code)
    • 5 *.sh files (199 lines of code)
    • 5 *.nuspec files (95 lines of code)
    • 1 *.js files (7 lines of code)
    • 1 *.mak files (4 lines of code)
  • " *.bat" is biggest, containing 84.62% of code.
  • " *.mak" is smallest, containing 0.2% of code.


*.bat1678 LOC (84%) 31 files
*.sh199 LOC (10%) 5 files
*.nuspec95 LOC (4%) 5 files
*.js7 LOC (<1%) 1 files
*.mak4 LOC (<1%) 1 files
Other Code
txt
plist
ini
patch
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]txt".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*[.]md".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]patch".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[Ss]amples/.*".
  • 844 files match defined criteria (262,912 lines of code, 34.0% vs. main code):
    • 625 *.rst files (230,563 lines of code)
    • 182 *.txt files (28,887 lines of code)
    • 13 *.py files (2,023 lines of code)
    • 11 *.md files (964 lines of code)
    • 8 *.json files (166 lines of code)
    • 2 *.plist files (140 lines of code)
    • 1 *.ini files (129 lines of code)
    • 1 *.go files (24 lines of code)
    • 1 *.patch files (16 lines of code)
  • " *.rst" is biggest, containing 87.7% of code.
  • " *.patch" is smallest, containing 0.01% of code.


*.rst230563 LOC (87%) 625 files
*.txt28887 LOC (10%) 182 files
*.py2023 LOC (<1%) 13 files
*.md964 LOC (<1%) 11 files
*.json166 LOC (<1%) 8 files
*.plist140 LOC (<1%) 2 files
*.ini129 LOC (<1%) 1 files
*.go24 LOC (<1%) 1 files
*.patch16 LOC (<1%) 1 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
  • *.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
  • *.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
  • *.vcxproj files are analyzed with XmlAnalyzer:
    • 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
  • *.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
  • *.filters files are analyzed with XmlAnalyzer:
    • 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
  • *.wxs files are analyzed with XmlAnalyzer:
    • 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
  • *.m 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
  • *.props files are analyzed with XmlAnalyzer:
    • 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
  • *.wixproj files are analyzed with XmlAnalyzer:
    • 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
  • *.lisp 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
  • *.man 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
  • *.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
  • *.proj files are analyzed with XmlAnalyzer:
    • 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
  • *.wxl files are analyzed with XmlAnalyzer:
    • 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
  • *.targets files are analyzed with XmlAnalyzer:
    • 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
  • *.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
  • *.fish 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
  • *.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
  • *.psm1 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
  • *.d files are analyzed with DAnalyzer:
    • 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
  • *.command files are analyzed with ShellAnalyzer:
    • 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
  • *.csh 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
  • *.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
  • *.pro 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
  • *.pyw 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
  • *.cfg files are analyzed with CfgAnalyzer:
    • 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
  • *.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
  • *.xml files are analyzed with XmlAnalyzer:
    • 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
  • *.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


2022-04-15 05:07