facebookresearch / hydra
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
in
feature
txt
toml
pyi
cfg
ini
g4
gitattributes
fish
  • 25 extensions are included in analyses: yaml, py, md, in, gitignore, feature, txt, svg, toml, json, yml, pyi, js, html, ipynb, cfg, ini, css, jsx, g4, gitattributes, rst, sh, fish, bash
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (34 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (74 files).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (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) (9 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.

main11984 LOC (25%) 199 files
test18459 LOC (39%) 479 files
generated0 LOC (0%) 0 files
build and deployment0 LOC (0%) 0 files
other15886 LOC (34%) 420 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
toml
g4
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 199 files match defined criteria (11,984 lines of code, 100.0% vs. main code):
    • 127 *.py files (10,429 lines of code)
    • 4 *.js files (434 lines of code)
    • 39 *.yaml files (412 lines of code)
    • 9 *.toml files (340 lines of code)
    • 2 *.g4 files (129 lines of code)
    • 2 *.css files (106 lines of code)
    • 2 *.jsx files (57 lines of code)
    • 3 *.html files (42 lines of code)
    • 10 *.in files (33 lines of code)
    • 1 *.yml files (2 lines of code)
  • " *.py" is biggest, containing 87.02% of code.
  • " *.yml" is smallest, containing 0.02% of code.


*.py10429 LOC (87%) 127 files
*.js434 LOC (3%) 4 files
*.yaml412 LOC (3%) 39 files
*.toml340 LOC (2%) 9 files
*.g4129 LOC (1%) 2 files
*.css106 LOC (<1%) 2 files
*.jsx57 LOC (<1%) 2 files
*.html42 LOC (<1%) 3 files
*.in33 LOC (<1%) 10 files
*.yml2 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
fish
feature
in
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 ".*[.]feature".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*_tests[.].*".
  • 479 files match defined criteria (18,459 lines of code, 154.0% vs. main code):
    • 174 *.py files (17,677 lines of code)
    • 289 *.yaml files (708 lines of code)
    • 1 *.fish files (26 lines of code)
    • 1 *.sh files (19 lines of code)
    • 1 *.bash files (13 lines of code)
    • 11 *.feature files (11 lines of code)
    • 1 *.in files (4 lines of code)
    • 1 *.yml files (1 lines of code)
  • " *.py" is biggest, containing 95.76% of code.
  • " *.yml" is smallest, containing 0.01% of code.


*.py17677 LOC (95%) 174 files
*.yaml708 LOC (3%) 289 files
*.fish26 LOC (<1%) 1 files
*.sh19 LOC (<1%) 1 files
*.bash13 LOC (<1%) 1 files
*.feature11 LOC (<1%) 11 files
*.in4 LOC (<1%) 1 files
*.yml1 LOC (<1%) 1 files
Other Code
ini
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 420 files match defined criteria (15,886 lines of code, 132.6% vs. main code):
    • 195 *.md files (12,332 lines of code)
    • 93 *.py files (1,447 lines of code)
    • 5 *.json files (1,007 lines of code)
    • 3 *.ipynb files (543 lines of code)
    • 115 *.yaml files (495 lines of code)
    • 1 *.rst files (23 lines of code)
    • 2 *.ini files (20 lines of code)
    • 6 *.in files (19 lines of code)
  • " *.md" is biggest, containing 77.63% of code.
  • " *.in" is smallest, containing 0.12% of code.


*.md12332 LOC (77%) 195 files
*.py1447 LOC (9%) 93 files
*.json1007 LOC (6%) 5 files
*.ipynb543 LOC (3%) 3 files
*.yaml495 LOC (3%) 115 files
*.rst23 LOC (<1%) 1 files
*.ini20 LOC (<1%) 2 files
*.in19 LOC (<1%) 6 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
  • *.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
  • *.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
  • *.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
  • *.g4 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
  • *.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
  • *.jsx 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
  • *.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
  • *.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
  • *.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


2022-01-25 19:43