huggingface / segment-anything-2
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
frag
txt
vert
watchmanconfig
babelrc
clang-format
eslintignore
prettierignore
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.

main11448 LOC (35%) 65 files
test106 LOC (<1%) 1 file
generated1516 LOC (4%) 13 files
build and deployment53 LOC (<1%) 2 files
other18967 LOC (59%) 251 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 ".*".
  • 65 files match defined criteria (11,448 LOC, 100.0% vs. main code):
    • 50 *.py files (9,690 LOC)
    • 13 *.yaml files (1,511 LOC)
    • 1 *.cu files (241 LOC)
    • 1 *.toml files (6 LOC)
  • " *.py" is biggest, containing 84.64% of LOC.
  • " *.toml" is smallest, containing 0.05% of LOC.


*.py9690 LOC (84%) 50 files
*.yaml1511 LOC (13%) 13 files
*.cu241 LOC (2%) 1 file
*.toml6 LOC (<1%) 1 file
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[.].*".
  • 1 file matches defined criteria (106 LOC, 0.9% vs. main code). All matches are in *.py files.


*.py106 LOC (100%) 1 file
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 ".*/__generated__/.*".
  • 13 files match defined criteria (1,516 LOC, 13.2% vs. main code). All matches are in *.ts files.


*.ts1516 LOC (100%) 13 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/docker[-]compose[.]yaml".
    • files with paths like ".*[.]sh".
  • 2 files match defined criteria (53 LOC, 0.5% vs. main code):
    • 1 *.yaml files (31 LOC)
    • 1 *.sh files (22 LOC)
  • " *.yaml" is biggest, containing 58.49% of LOC.
  • " *.sh" is smallest, containing 41.51% of LOC.


*.yaml31 LOC (58%) 1 file
*.sh22 LOC (41%) 1 file
Other Code
txt
frag
vert
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 ".*[.]txt".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/INSTALL[.][a-z0-9]+".
  • 251 files match defined criteria (18,967 LOC, 165.7% vs. main code):
    • 103 *.ts files (8,570 LOC)
    • 100 *.tsx files (5,253 LOC)
    • 4 *.txt files (1,457 LOC)
    • 11 *.py files (1,234 LOC)
    • 14 *.frag files (806 LOC)
    • 7 *.md files (601 LOC)
    • 3 *.graphql files (398 LOC)
    • 1 *.scss files (300 LOC)
    • 3 *.json files (170 LOC)
    • 2 *.js files (121 LOC)
    • 2 *.vert files (43 LOC)
    • 1 *.html files (14 LOC)
  • " *.ts" is biggest, containing 45.18% of LOC.
  • " *.html" is smallest, containing 0.07% of LOC.


*.ts8570 LOC (45%) 103 files
*.tsx5253 LOC (27%) 100 files
*.txt1457 LOC (7%) 4 files
*.py1234 LOC (6%) 11 files
*.frag806 LOC (4%) 14 files
*.md601 LOC (3%) 7 files
*.graphql398 LOC (2%) 3 files
*.scss300 LOC (1%) 1 file
*.json170 LOC (<1%) 3 files
*.js121 LOC (<1%) 2 files
*.vert43 LOC (<1%) 2 files
*.html14 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-06-30 09:10