instagram / Fixit
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
watchmanconfig
editorconfig
  • 17 extensions are included in analyses: py, json, svg, rst, md, txt, ipynb, yaml, yml, css, in, ini, gitignore, watchmanconfig, toml, editorconfig, html
  • 4 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/docs/.*" (Documentation) (8 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (9 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.

main6393 LOC (54%) 72 files
test1978 LOC (16%) 28 files
generated0 LOC (0%) 0 files
build and deployment0 LOC (0%) 0 files
other3439 LOC (29%) 42 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 72 files match defined criteria (6,393 lines of code, 100.0% vs. main code):
    • 69 *.py files (6,379 lines of code)
    • 1 *.toml files (9 lines of code)
    • 1 *.yml files (4 lines of code)
    • 1 *.in files (1 lines of code)
  • " *.py" is biggest, containing 99.78% of code.
  • " *.in" is smallest, containing 0.02% of code.


*.py6379 LOC (99%) 69 files
*.toml9 LOC (<1%) 1 files
*.yml4 LOC (<1%) 1 files
*.in1 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]ests/.*".
  • 28 files match defined criteria (1,978 lines of code, 30.9% vs. main code). All matches are in *.py files.


*.py1978 LOC (100%) 28 files
Other Code
ini
txt
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 ".*[.]txt".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/README[.][a-z0-9]+".
  • 42 files match defined criteria (3,439 lines of code, 53.8% vs. main code):
    • 35 *.json files (3,240 lines of code)
    • 1 *.rst files (81 lines of code)
    • 3 *.md files (60 lines of code)
    • 1 *.ini files (40 lines of code)
    • 2 *.txt files (18 lines of code)
  • " *.json" is biggest, containing 94.21% of code.
  • " *.txt" is smallest, containing 0.52% of code.


*.json3240 LOC (94%) 35 files
*.rst81 LOC (2%) 1 files
*.md60 LOC (1%) 3 files
*.ini40 LOC (1%) 1 files
*.txt18 LOC (<1%) 2 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
  • *.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
  • *.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
  • *.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-04-16 06:55