alibaba / hooks
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
babelrc
txt
editorconfig
npmrc
snap
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.

main6001 LOC (23%) 137 files
test7208 LOC (27%) 98 files
generated0 LOC (0%) 0 files
build and deployment40 LOC (<1%) 4 files
other12736 LOC (49%) 364 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 ".*".
  • 137 files match defined criteria (6,001 LOC, 100.0% vs. main code):
    • 120 *.ts files (5,292 LOC)
    • 8 *.tsx files (452 LOC)
    • 6 *.js files (150 LOC)
    • 2 *.css files (80 LOC)
    • 1 *.html files (27 LOC)
  • " *.ts" is biggest, containing 88.19% of LOC.
  • " *.html" is smallest, containing 0.45% of LOC.


*.ts5292 LOC (88%) 120 files
*.tsx452 LOC (7%) 8 files
*.js150 LOC (2%) 6 files
*.css80 LOC (1%) 2 files
*.html27 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
snap
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/jest[.][a-zA-Z0-9\.]+".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*__tests__.*".
    • files with paths like ".*__test__.*".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*[.]snap".
  • 98 files match defined criteria (7,208 LOC, 120.1% vs. main code):
    • 84 *.ts files (6,285 LOC)
    • 11 *.tsx files (828 LOC)
    • 1 *.snap files (55 LOC)
    • 2 *.js files (40 LOC)
  • " *.ts" is biggest, containing 87.19% of LOC.
  • " *.js" is smallest, containing 0.55% of LOC.


*.ts6285 LOC (87%) 84 files
*.tsx828 LOC (11%) 11 files
*.snap55 LOC (<1%) 1 file
*.js40 LOC (<1%) 2 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 ".*/pnpm.*[.]ya?ml".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 4 files match defined criteria (40 LOC, 0.7% vs. main code):
    • 3 *.js files (37 LOC)
    • 1 *.yaml files (3 LOC)
  • " *.js" is biggest, containing 92.5% of LOC.
  • " *.yaml" is smallest, containing 7.5% of LOC.


*.js37 LOC (92%) 3 files
*.yaml3 LOC (7%) 1 file
Other Code
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 ".*/[Dd]emos?/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]npmrc".
    • files with paths like ".*[.]editorconfig".
  • 364 files match defined criteria (12,736 LOC, 212.2% vs. main code):
    • 178 *.tsx files (6,444 LOC)
    • 176 *.md files (6,000 LOC)
    • 10 *.json files (292 LOC)
  • " *.tsx" is biggest, containing 50.6% of LOC.
  • " *.json" is smallest, containing 2.29% of LOC.


*.tsx6444 LOC (50%) 178 files
*.md6000 LOC (47%) 176 files
*.json292 LOC (2%) 10 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-14 18:52