mysql / mysql-shell-plugins
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
snap
ini
mjs
plist
resx
csproj
cmd
eslintignore
vscodeignore
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.

main177371 LOC (49%) 797 files
test108789 LOC (30%) 430 files
generated9720 LOC (2%) 4 files
build and deployment498 LOC (<1%) 15 files
other62585 LOC (17%) 845 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 797 files match defined criteria (177,371 LOC, 100.0% vs. main code):
    • 120 *.tsx files (43,065 LOC)
    • 221 *.ts files (39,021 LOC)
    • 145 *.py files (37,388 LOC)
    • 170 *.js files (19,952 LOC)
    • 10 *.g4 files (16,119 LOC)
    • 46 *.sql files (12,835 LOC)
    • 66 *.css files (6,947 LOC)
    • 2 *.html files (1,045 LOC)
    • 6 *.cs files (341 LOC)
    • 3 *.swift files (274 LOC)
    • 4 *.ps1 files (182 LOC)
    • 1 *.yaml files (96 LOC)
    • 1 *.cpp files (77 LOC)
    • 1 *.cmd files (24 LOC)
    • 1 *.cjs files (5 LOC)
  • " *.tsx" is biggest, containing 24.28% of LOC.
  • " *.cjs" is smallest, containing 0% of LOC.


*.tsx43065 LOC (24%) 120 files
*.ts39021 LOC (21%) 221 files
*.py37388 LOC (21%) 145 files
*.js19952 LOC (11%) 170 files
*.g416119 LOC (9%) 10 files
*.sql12835 LOC (7%) 46 files
*.css6947 LOC (3%) 66 files
*.html1045 LOC (<1%) 2 files
*.cs341 LOC (<1%) 6 files
*.swift274 LOC (<1%) 3 files
*.ps1182 LOC (<1%) 4 files
*.yaml96 LOC (<1%) 1 file
*.cpp77 LOC (<1%) 1 file
*.cmd24 LOC (<1%) 1 file
*.cjs5 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
snap
mjs
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*[.]snap".
    • files with paths like ".*/vitest[.].*".
    • files with paths like ".*/testing[.].*".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*[.]tests[.].*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*[-]tests/.*".
    • files with paths like ".*[.]spec[.]tsx".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*/__mock[a-zA-Z0-9_\- ]+/.*".
    • files with paths like ".*[-]tests[-].*".
    • files with paths like ".*/tests_.*".
  • 430 files match defined criteria (108,789 LOC, 61.3% vs. main code):
    • 70 *.snap files (40,484 LOC)
    • 186 *.ts files (38,808 LOC)
    • 77 *.tsx files (13,868 LOC)
    • 80 *.py files (13,679 LOC)
    • 9 *.sql files (1,366 LOC)
    • 1 *.css files (251 LOC)
    • 2 *.js files (225 LOC)
    • 1 *.mjs files (61 LOC)
    • 2 *.cjs files (44 LOC)
    • 2 *.sh files (3 LOC)
  • " *.snap" is biggest, containing 37.21% of LOC.
  • " *.sh" is smallest, containing 0% of LOC.


*.snap40484 LOC (37%) 70 files
*.ts38808 LOC (35%) 186 files
*.tsx13868 LOC (12%) 77 files
*.py13679 LOC (12%) 80 files
*.sql1366 LOC (1%) 9 files
*.css251 LOC (<1%) 1 file
*.js225 LOC (<1%) 2 files
*.mjs61 LOC (<1%) 1 file
*.cjs44 LOC (<1%) 2 files
*.sh3 LOC (<1%) 2 files
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*[.]cs" AND any line of content like "[/][/][ ]*".
  • 4 files match defined criteria (9,720 LOC, 5.5% vs. main code):
    • 2 *.json files (9,674 LOC)
    • 2 *.cs files (46 LOC)
  • " *.json" is biggest, containing 99.53% of LOC.
  • " *.cs" is smallest, containing 0.47% of LOC.


*.json9674 LOC (99%) 2 files
*.cs46 LOC (<1%) 2 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*[.]csproj".
  • 15 files match defined criteria (498 LOC, 0.3% vs. main code):
    • 14 *.sh files (388 LOC)
    • 1 *.csproj files (110 LOC)
  • " *.sh" is biggest, containing 77.91% of LOC.
  • " *.csproj" is smallest, containing 22.09% of LOC.


*.sh388 LOC (77%) 14 files
*.csproj110 LOC (22%) 1 file
Other Code
txt
mjs
ini
plist
snap
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]vscodeignore".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]xib".
    • files with paths like ".*/[.]eslintignore".
  • 845 files match defined criteria (62,585 LOC, 35.3% vs. main code):
    • 169 *.json files (44,776 LOC)
    • 349 *.svg files (6,111 LOC)
    • 21 *.ts files (3,612 LOC)
    • 29 *.tsx files (1,706 LOC)
    • 16 *.css files (1,575 LOC)
    • 201 *.txt files (1,565 LOC)
    • 39 *.md files (1,550 LOC)
    • 3 *.html files (821 LOC)
    • 3 *.sql files (346 LOC)
    • 1 *.xib files (250 LOC)
    • 2 *.mjs files (96 LOC)
    • 6 *.ini files (82 LOC)
    • 2 *.plist files (47 LOC)
    • 2 *.snap files (36 LOC)
    • 2 *.js files (12 LOC)
  • " *.json" is biggest, containing 71.54% of LOC.
  • " *.js" is smallest, containing 0.02% of LOC.


*.json44776 LOC (71%) 169 files
*.svg6111 LOC (9%) 349 files
*.ts3612 LOC (5%) 21 files
*.tsx1706 LOC (2%) 29 files
*.css1575 LOC (2%) 16 files
*.txt1565 LOC (2%) 201 files
*.md1550 LOC (2%) 39 files
*.html821 LOC (1%) 3 files
*.sql346 LOC (<1%) 3 files
*.xib250 LOC (<1%) 1 file
*.mjs96 LOC (<1%) 2 files
*.ini82 LOC (<1%) 6 files
*.plist47 LOC (<1%) 2 files
*.snap36 LOC (<1%) 2 files
*.js12 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.tsx files are analyzed with TypeScriptAnalyzer:
    • 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
  • *.ts files are analyzed with TypeScriptAnalyzer:
    • 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
  • *.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
  • *.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
  • *.sql files are analyzed with SqlAnalyzer:
    • 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
  • *.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
  • *.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
  • *.cs files are analyzed with CSharpAnalyzer:
    • 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 (based on namespace heuristics)
  • *.swift files are analyzed with SwiftAnalyzer:
    • 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
  • *.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
  • *.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
  • *.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
  • *.cmd 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
  • *.cjs 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


2025-05-09 19:49