pytorch / builder
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
patch
txt
ini
gitattributes
  • 15 extensions are included in analyses: sh, bat, yml, yaml, py, md, cpp, gitignore, patch, ps1, txt, ini, h, gitattributes, json
  • 3 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (15 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.

main3924 LOC (36%) 43 files
test608 LOC (5%) 10 files
generated0 LOC (0%) 0 files
build and deployment5525 LOC (51%) 108 files
other765 LOC (7%) 15 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 43 files match defined criteria (3,924 lines of code, 100.0% vs. main code):
    • 12 *.py files (2,165 lines of code)
    • 1 *.h files (916 lines of code)
    • 15 *.yaml files (399 lines of code)
    • 13 *.yml files (367 lines of code)
    • 2 *.ps1 files (77 lines of code)
  • " *.py" is biggest, containing 55.17% of code.
  • " *.ps1" is smallest, containing 1.96% of code.


*.py2165 LOC (55%) 12 files
*.h916 LOC (23%) 1 files
*.yaml399 LOC (10%) 15 files
*.yml367 LOC (9%) 13 files
*.ps177 LOC (1%) 2 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 ".*_test[.].*".
    • files with paths like ".*_tests[.].*".
  • 10 files match defined criteria (608 lines of code, 15.5% vs. main code):
    • 3 *.sh files (368 lines of code)
    • 1 *.bat files (181 lines of code)
    • 2 *.py files (33 lines of code)
    • 4 *.cpp files (26 lines of code)
  • " *.sh" is biggest, containing 60.53% of code.
  • " *.cpp" is smallest, containing 4.28% of code.


*.sh368 LOC (60%) 3 files
*.bat181 LOC (29%) 1 files
*.py33 LOC (5%) 2 files
*.cpp26 LOC (4%) 4 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 ".*[.]bat".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
  • 108 files match defined criteria (5,525 lines of code, 140.8% vs. main code):
    • 69 *.sh files (3,852 lines of code)
    • 39 *.bat files (1,673 lines of code)
  • " *.sh" is biggest, containing 69.72% of code.
  • " *.bat" is smallest, containing 30.28% of code.


*.sh3852 LOC (69%) 69 files
*.bat1673 LOC (30%) 39 files
Other Code
patch
ini
txt
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 ".*[.]patch".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]ini".
  • 15 files match defined criteria (765 lines of code, 19.5% vs. main code):
    • 3 *.patch files (399 lines of code)
    • 9 *.md files (289 lines of code)
    • 1 *.json files (72 lines of code)
    • 1 *.ini files (3 lines of code)
    • 1 *.txt files (2 lines of code)
  • " *.patch" is biggest, containing 52.16% of code.
  • " *.txt" is smallest, containing 0.26% of code.


*.patch399 LOC (52%) 3 files
*.md289 LOC (37%) 9 files
*.json72 LOC (9%) 1 files
*.ini3 LOC (<1%) 1 files
*.txt2 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
  • *.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
  • *.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
  • *.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
  • *.ps1 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-15 00:53