facebookincubator / profilo
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
in
clang-format
cmake
properties
dockerignore
gitattributes
org
pro
sublime-syntax
  • 33 extensions are included in analyses: h, cpp, java, less, cc, py, md, c, txt, bzl, rst, sh, yml, xml, gradle, js, css, html, gitignore, svg, in, clang-format, cmake, properties, json, hpp, dockerignore, gitattributes, bat, org, pro, cu, sublime-syntax
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (17 files).
    • exclude files with path like ".*/extern(al)?/.*" (Dependencies) (2 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (9 files).
    • exclude files with path like ".*/deps/.*" (Dependencies) (422 files).
    • exclude files with path like ".*/bootstrap[.](js|css|less|scss|styl)" (Bootstrap) (0 files).
    • exclude files with path like ".*/normalize[.](css|less|scss|styl)" (Normalize css) (0 files).
    • exclude files with path like ".*/docs?/_?(build|themes?|templates?|static)/.*" (Sphinx) (0 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (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.

main48472 LOC (83%) 325 files
test4839 LOC (8%) 32 files
generated827 LOC (1%) 7 files
build and deployment34 LOC (<1%) 5 files
other3786 LOC (6%) 10 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 325 files match defined criteria (48,472 lines of code, 100.0% vs. main code):
    • 137 *.h files (32,180 lines of code)
    • 70 *.cpp files (7,375 lines of code)
    • 68 *.java files (5,770 lines of code)
    • 32 *.py files (2,475 lines of code)
    • 9 *.bzl files (438 lines of code)
    • 4 *.js files (153 lines of code)
    • 3 *.css files (58 lines of code)
    • 2 *.xml files (23 lines of code)
  • " *.h" is biggest, containing 66.39% of code.
  • " *.xml" is smallest, containing 0.05% of code.


*.h32180 LOC (66%) 137 files
*.cpp7375 LOC (15%) 70 files
*.java5770 LOC (11%) 68 files
*.py2475 LOC (5%) 32 files
*.bzl438 LOC (<1%) 9 files
*.js153 LOC (<1%) 4 files
*.css58 LOC (<1%) 3 files
*.xml23 LOC (<1%) 2 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 ".*_test[.].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/[Tt]est/.*".
  • 32 files match defined criteria (4,839 lines of code, 10.0% vs. main code):
    • 18 *.cpp files (2,864 lines of code)
    • 11 *.java files (1,921 lines of code)
    • 1 *.h files (28 lines of code)
    • 1 *.py files (21 lines of code)
    • 1 *.bzl files (5 lines of code)
  • " *.cpp" is biggest, containing 59.19% of code.
  • " *.bzl" is smallest, containing 0.1% of code.


*.cpp2864 LOC (59%) 18 files
*.java1921 LOC (39%) 11 files
*.h28 LOC (<1%) 1 files
*.py21 LOC (<1%) 1 files
*.bzl5 LOC (<1%) 1 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/.*".
  • 7 files match defined criteria (827 lines of code, 1.7% vs. main code):
    • 2 *.cpp files (348 lines of code)
    • 1 *.java files (239 lines of code)
    • 3 *.h files (229 lines of code)
    • 1 *.sh files (11 lines of code)
  • " *.cpp" is biggest, containing 42.08% of code.
  • " *.sh" is smallest, containing 1.33% of code.


*.cpp348 LOC (42%) 2 files
*.java239 LOC (28%) 1 files
*.h229 LOC (27%) 3 files
*.sh11 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 ".*/package[.]json".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]bat".
  • 5 files match defined criteria (34 lines of code, 0.1% vs. main code). All matches are in *.sh files.


*.sh34 LOC (100%) 5 files
Other Code
txt
properties
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 ".*/[Dd]emos?/.*".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
  • 10 files match defined criteria (3,786 lines of code, 7.8% vs. main code):
    • 1 *.svg files (1,796 lines of code)
    • 2 *.txt files (1,666 lines of code)
    • 4 *.md files (219 lines of code)
    • 2 *.json files (101 lines of code)
    • 1 *.properties files (4 lines of code)
  • " *.svg" is biggest, containing 47.44% of code.
  • " *.properties" is smallest, containing 0.11% of code.


*.svg1796 LOC (47%) 1 files
*.txt1666 LOC (44%) 2 files
*.md219 LOC (5%) 4 files
*.json101 LOC (2%) 2 files
*.properties4 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.java files are analyzed with JavaAnalyzer:
    • 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 (based on package names)
  • *.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
  • *.bzl 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
  • *.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
  • *.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
  • *.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


2022-04-15 01:22