microsoft / msphpsql
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
phpt
txt
m4
  • 15 extensions are included in analyses: phpt, inc, php, h, cpp, py, sql, md, yml, txt, sh, m4, json, hpp, ps1
  • 4 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (1 file).
    • exclude files with path like ".*[.]m4" (stuff autogenerated by autoconf - still C deps) (2 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.

main20513 LOC (19%) 46 files
test80548 LOC (78%) 848 files
generated0 LOC (0%) 0 files
build and deployment21 LOC (<1%) 2 files
other1728 LOC (1%) 11 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 ".*".
  • 46 files match defined criteria (20,513 lines of code, 100.0% vs. main code):
    • 18 *.cpp files (14,630 lines of code)
    • 19 *.h files (4,557 lines of code)
    • 3 *.py files (600 lines of code)
    • 3 *.yml files (462 lines of code)
    • 1 *.hpp files (159 lines of code)
    • 2 *.php files (105 lines of code)
  • " *.cpp" is biggest, containing 71.32% of code.
  • " *.php" is smallest, containing 0.51% of code.


*.cpp14630 LOC (71%) 18 files
*.h4557 LOC (22%) 19 files
*.py600 LOC (2%) 3 files
*.yml462 LOC (2%) 3 files
*.hpp159 LOC (<1%) 1 files
*.php105 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
phpt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/test_.*".
  • 848 files match defined criteria (80,548 lines of code, 392.7% vs. main code):
    • 743 *.phpt files (68,782 lines of code)
    • 55 *.inc files (8,831 lines of code)
    • 36 *.php files (2,005 lines of code)
    • 5 *.py files (544 lines of code)
    • 1 *.sh files (168 lines of code)
    • 7 *.sql files (159 lines of code)
    • 1 *.ps1 files (59 lines of code)
  • " *.phpt" is biggest, containing 85.39% of code.
  • " *.ps1" is smallest, containing 0.07% of code.


*.phpt68782 LOC (85%) 743 files
*.inc8831 LOC (10%) 55 files
*.php2005 LOC (2%) 36 files
*.py544 LOC (<1%) 5 files
*.sh168 LOC (<1%) 1 files
*.sql159 LOC (<1%) 7 files
*.ps159 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".
  • 2 files match defined criteria (21 lines of code, 0.1% vs. main code). All matches are in *.sh files.


*.sh21 LOC (100%) 2 files
Other Code
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 ".*[.]json".
    • files with paths like ".*[.]txt".
  • 11 files match defined criteria (1,728 lines of code, 8.4% vs. main code):
    • 7 *.md files (1,704 lines of code)
    • 2 *.json files (15 lines of code)
    • 2 *.txt files (9 lines of code)
  • " *.md" is biggest, containing 98.61% of code.
  • " *.txt" is smallest, containing 0.52% of code.


*.md1704 LOC (98%) 7 files
*.json15 LOC (<1%) 2 files
*.txt9 LOC (<1%) 2 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
  • *.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
  • *.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
  • *.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
  • *.hpp 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
  • *.php files are analyzed with PhpAnalyzer:
    • 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


2022-01-30 07:31