facebookresearch / pyrobot
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
launch
txt
rviz
srdf
urdf
dae
dockerignore
cc
  • 23 extensions are included in analyses: py, md, yaml, launch, xml, txt, rst, sh, js, json, gitignore, svg, h, rviz, srdf, yml, cpp, urdf, css, dae, dockerignore, cc, bat
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/docs/.*" (Documentation) (65 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (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) (17 files).
    • exclude files with path like ".*/static/js/.*" (JS library) (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.

main15966 LOC (69%) 180 files
test836 LOC (3%) 14 files
generated0 LOC (0%) 0 files
build and deployment507 LOC (2%) 6 files
other5780 LOC (25%) 131 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
urdf
launch
rviz
srdf
cc
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 180 files match defined criteria (15,966 lines of code, 100.0% vs. main code):
    • 76 *.py files (7,795 lines of code)
    • 3 *.urdf files (2,691 lines of code)
    • 3 *.cpp files (1,436 lines of code)
    • 46 *.yaml files (1,383 lines of code)
    • 41 *.launch files (895 lines of code)
    • 2 *.rviz files (856 lines of code)
    • 3 *.srdf files (413 lines of code)
    • 2 *.cc files (255 lines of code)
    • 4 *.h files (242 lines of code)
  • " *.py" is biggest, containing 48.82% of code.
  • " *.h" is smallest, containing 1.52% of code.


*.py7795 LOC (48%) 76 files
*.urdf2691 LOC (16%) 3 files
*.cpp1436 LOC (8%) 3 files
*.yaml1383 LOC (8%) 46 files
*.launch895 LOC (5%) 41 files
*.rviz856 LOC (5%) 2 files
*.srdf413 LOC (2%) 3 files
*.cc255 LOC (1%) 2 files
*.h242 LOC (1%) 4 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 ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/test[-]data/.*".
  • 14 files match defined criteria (836 lines of code, 5.2% vs. main code):
    • 11 *.py files (821 lines of code)
    • 2 *.sh files (9 lines of code)
    • 1 *.yaml files (6 lines of code)
  • " *.py" is biggest, containing 98.21% of code.
  • " *.yaml" is smallest, containing 0.72% of code.


*.py821 LOC (98%) 11 files
*.sh9 LOC (1%) 2 files
*.yaml6 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 ".*[.]sh".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/docker[-]compose[.]yml".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 6 files match defined criteria (507 lines of code, 3.2% vs. main code). All matches are in *.sh files.


*.sh507 LOC (100%) 6 files
Other Code
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 ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 131 files match defined criteria (5,780 lines of code, 36.2% vs. main code):
    • 73 *.py files (4,149 lines of code)
    • 31 *.md files (1,279 lines of code)
    • 26 *.xml files (335 lines of code)
    • 1 *.json files (17 lines of code)
  • " *.py" is biggest, containing 71.78% of code.
  • " *.json" is smallest, containing 0.29% of code.


*.py4149 LOC (71%) 73 files
*.md1279 LOC (22%) 31 files
*.xml335 LOC (5%) 26 files
*.json17 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
  • *.urdf 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
  • *.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
  • *.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
  • *.launch 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
  • *.rviz 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
  • *.srdf 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
  • *.cc 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


2022-01-25 19:40