fbsamples / f8app
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
plist
babelrc
properties
gitattributes
watchmanconfig
pro
txt
eslintignore
  • 22 extensions are included in analyses: js, json, xml, plist, sh, md, babelrc, m, gradle, properties, java, yml, gitignore, gitattributes, watchmanconfig, xib, bat, graphql, h, pro, txt, eslintignore
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (9 files).
    • exclude files with path like ".*/react(-[^.]*)?\.js" (React) (1 file).
    • exclude files with path like ".*/proguard[-]rules[.]pro" (ProGuard) (1 file).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (1 file).
    • 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 ".*[.]txt" (Text files) (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.

main13648 LOC (86%) 195 files
test280 LOC (1%) 7 files
generated248 LOC (1%) 2 files
build and deployment238 LOC (1%) 8 files
other1391 LOC (8%) 59 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 ".*".
  • 195 files match defined criteria (13,648 lines of code, 100.0% vs. main code):
    • 189 *.js files (13,451 lines of code)
    • 3 *.m files (128 lines of code)
    • 2 *.java files (65 lines of code)
    • 1 *.h files (4 lines of code)
  • " *.js" is biggest, containing 98.56% of code.
  • " *.h" is smallest, containing 0.03% of code.


*.js13451 LOC (98%) 189 files
*.m128 LOC (<1%) 3 files
*.java65 LOC (<1%) 2 files
*.h4 LOC (<1%) 1 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 ".*/__mocks?__/.*".
    • files with paths like ".*__tests__.*".
  • 7 files match defined criteria (280 lines of code, 2.1% vs. main code). All matches are in *.js files.


*.js280 LOC (100%) 7 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__/.*".
  • 2 files match defined criteria (248 lines of code, 1.8% vs. main code):
    • 1 *.js files (218 lines of code)
    • 1 *.graphql files (30 lines of code)
  • " *.js" is biggest, containing 87.9% of code.
  • " *.graphql" is smallest, containing 12.1% of code.


*.js218 LOC (87%) 1 files
*.graphql30 LOC (12%) 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 ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*/docker[-]compose[.]yml".
  • 8 files match defined criteria (238 lines of code, 1.7% vs. main code):
    • 3 *.gradle files (102 lines of code)
    • 1 *.bat files (66 lines of code)
    • 3 *.sh files (42 lines of code)
    • 1 *.yml files (28 lines of code)
  • " *.gradle" is biggest, containing 42.86% of code.
  • " *.yml" is smallest, containing 11.76% of code.


*.gradle102 LOC (42%) 3 files
*.bat66 LOC (27%) 1 files
*.sh42 LOC (17%) 3 files
*.yml28 LOC (11%) 1 files
Other Code
plist
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 ".*/[Dd]emos?/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]xib".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 59 files match defined criteria (1,391 lines of code, 10.2% vs. main code):
    • 4 *.js files (790 lines of code)
    • 40 *.json files (226 lines of code)
    • 4 *.plist files (181 lines of code)
    • 5 *.xml files (85 lines of code)
    • 3 *.md files (49 lines of code)
    • 1 *.xib files (37 lines of code)
    • 2 *.properties files (23 lines of code)
  • " *.js" is biggest, containing 56.79% of code.
  • " *.properties" is smallest, containing 1.65% of code.


*.js790 LOC (56%) 4 files
*.json226 LOC (16%) 40 files
*.plist181 LOC (13%) 4 files
*.xml85 LOC (6%) 5 files
*.md49 LOC (3%) 3 files
*.xib37 LOC (2%) 1 files
*.properties23 LOC (1%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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)
  • *.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


2022-01-26 09:33