facebookresearch / habitat-lab
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
ini
cfg
toml
editorconfig
  • 15 extensions are included in analyses: py, yaml, md, txt, rst, sh, json, gitignore, in, ini, cfg, toml, editorconfig, yml, ipynb
  • 5 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 ".*/docs/.*" (Documentation) (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).
    • exclude files with path like ".*[.]txt" (Text files) (5 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.

main23142 LOC (80%) 190 files
test3544 LOC (12%) 37 files
generated0 LOC (0%) 0 files
build and deployment76 LOC (<1%) 3 files
other2068 LOC (7%) 21 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cfg
toml
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 190 files match defined criteria (23,142 lines of code, 100.0% vs. main code):
    • 145 *.py files (21,507 lines of code)
    • 42 *.yaml files (1,585 lines of code)
    • 1 *.cfg files (25 lines of code)
    • 1 *.toml files (22 lines of code)
    • 1 *.in files (3 lines of code)
  • " *.py" is biggest, containing 92.93% of code.
  • " *.in" is smallest, containing 0.01% of code.


*.py21507 LOC (92%) 145 files
*.yaml1585 LOC (6%) 42 files
*.cfg25 LOC (<1%) 1 files
*.toml22 LOC (<1%) 1 files
*.in3 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 ".*/test_.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
  • 37 files match defined criteria (3,544 lines of code, 15.3% vs. main code):
    • 26 *.py files (3,063 lines of code)
    • 11 *.yaml files (481 lines of code)
  • " *.py" is biggest, containing 86.43% of code.
  • " *.yaml" is smallest, containing 13.57% of code.


*.py3063 LOC (86%) 26 files
*.yaml481 LOC (13%) 11 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 ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 3 files match defined criteria (76 lines of code, 0.3% vs. main code). All matches are in *.sh files.


*.sh76 LOC (100%) 3 files
Other Code
ini
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 21 files match defined criteria (2,068 lines of code, 8.9% vs. main code):
    • 12 *.py files (1,021 lines of code)
    • 1 *.ipynb files (598 lines of code)
    • 7 *.md files (420 lines of code)
    • 1 *.ini files (29 lines of code)
  • " *.py" is biggest, containing 49.37% of code.
  • " *.ini" is smallest, containing 1.4% of code.


*.py1021 LOC (49%) 12 files
*.ipynb598 LOC (28%) 1 files
*.md420 LOC (20%) 7 files
*.ini29 LOC (1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.yaml 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
  • *.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
  • *.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


2022-01-25 19:41