flashlight / wav2letter
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
cfg
txt
cmake
clang-format
  • 15 extensions are included in analyses: cfg, py, cpp, md, h, txt, sh, cmake, pl, gitignore, clang-format, json, yml, ipynb, yaml
  • 3 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (8 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).
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.

main20297 LOC (76%) 318 files
test920 LOC (3%) 11 files
generated0 LOC (0%) 0 files
build and deployment727 LOC (2%) 19 files
other4534 LOC (17%) 79 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cfg
cmake
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 318 files match defined criteria (20,297 lines of code, 100.0% vs. main code):
    • 50 *.cpp files (9,072 lines of code)
    • 68 *.py files (5,531 lines of code)
    • 151 *.cfg files (3,696 lines of code)
    • 44 *.h files (1,721 lines of code)
    • 2 *.pl files (194 lines of code)
    • 3 *.cmake files (83 lines of code)
  • " *.cpp" is biggest, containing 44.7% of code.
  • " *.cmake" is smallest, containing 0.41% of code.


*.cpp9072 LOC (44%) 50 files
*.py5531 LOC (27%) 68 files
*.cfg3696 LOC (18%) 151 files
*.h1721 LOC (8%) 44 files
*.pl194 LOC (<1%) 2 files
*.cmake83 LOC (<1%) 3 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]est/.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
  • 11 files match defined criteria (920 lines of code, 4.5% vs. main code):
    • 10 *.cpp files (906 lines of code)
    • 1 *.h files (14 lines of code)
  • " *.cpp" is biggest, containing 98.48% of code.
  • " *.h" is smallest, containing 1.52% of code.


*.cpp906 LOC (98%) 10 files
*.h14 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 ".*[.]sh".
  • 19 files match defined criteria (727 lines of code, 3.6% vs. main code). All matches are in *.sh files.


*.sh727 LOC (100%) 19 files
Other Code
txt
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 ".*[.]json".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ee]xamples/.*".
  • 79 files match defined criteria (4,534 lines of code, 22.3% vs. main code):
    • 47 *.md files (2,538 lines of code)
    • 23 *.txt files (879 lines of code)
    • 5 *.cpp files (841 lines of code)
    • 3 *.h files (204 lines of code)
    • 1 *.json files (72 lines of code)
  • " *.md" is biggest, containing 55.98% of code.
  • " *.json" is smallest, containing 1.59% of code.


*.md2538 LOC (55%) 47 files
*.txt879 LOC (19%) 23 files
*.cpp841 LOC (18%) 5 files
*.h204 LOC (4%) 3 files
*.json72 LOC (1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.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
  • *.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
  • *.pl files are analyzed with PerlAnalyzer:
    • 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
  • *.cmake 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


2022-04-16 07:19