huggingface / huggingface.js
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
prettierignore
eslintignore
npmrc
svelte
txt
editorconfig
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.

main31521 LOC (53%) 529 files
test11141 LOC (18%) 72 files
generated0 LOC (0%) 0 files
build and deployment7862 LOC (13%) 35 files
other8439 LOC (14%) 166 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 ".*".
  • 529 files match defined criteria (31,521 LOC, 100.0% vs. main code):
    • 349 *.ts files (28,663 LOC)
    • 71 *.py files (1,247 LOC)
    • 53 *.js files (880 LOC)
    • 56 *.jinja files (731 LOC)
  • " *.ts" is biggest, containing 90.93% of LOC.
  • " *.jinja" is smallest, containing 2.32% of LOC.


*.ts28663 LOC (90%) 349 files
*.py1247 LOC (3%) 71 files
*.js880 LOC (2%) 53 files
*.jinja731 LOC (2%) 56 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
svelte
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*/vitest[.].*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*/test[.].*".
  • 72 files match defined criteria (11,141 LOC, 35.3% vs. main code):
    • 64 *.ts files (6,633 LOC)
    • 5 *.js files (4,452 LOC)
    • 1 *.yaml files (23 LOC)
    • 1 *.svelte files (21 LOC)
    • 1 *.html files (12 LOC)
  • " *.ts" is biggest, containing 59.54% of LOC.
  • " *.html" is smallest, containing 0.11% of LOC.


*.ts6633 LOC (59%) 64 files
*.js4452 LOC (39%) 5 files
*.yaml23 LOC (<1%) 1 file
*.svelte21 LOC (<1%) 1 file
*.html12 LOC (<1%) 1 file
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 ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 35 files match defined criteria (7,862 LOC, 24.9% vs. main code):
    • 17 *.yaml files (7,625 LOC)
    • 18 *.sh files (237 LOC)
  • " *.yaml" is biggest, containing 96.99% of LOC.
  • " *.sh" is smallest, containing 3.01% of LOC.


*.yaml7625 LOC (96%) 17 files
*.sh237 LOC (3%) 18 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*/vendor/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]npmrc".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]editorconfig".
  • 166 files match defined criteria (8,439 LOC, 26.8% vs. main code):
    • 104 *.json files (4,720 LOC)
    • 62 *.md files (3,719 LOC)
  • " *.json" is biggest, containing 55.93% of LOC.
  • " *.md" is smallest, containing 44.07% of LOC.


*.json4720 LOC (55%) 104 files
*.md3719 LOC (44%) 62 files
Analyzers
Info about analyzers used for source code examinations.


2025-06-30 09:01