apache / incubator-devlake
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
mod
editorconfig
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.

main130092 LOC (73%) 2,295 files
test19426 LOC (10%) 256 files
generated0 LOC (0%) 0 files
build and deployment191 LOC (<1%) 10 files
other27641 LOC (15%) 86 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 ".*".
  • 2295 files match defined criteria (130,092 LOC, 100.0% vs. main code):
    • 1,987 *.go files (112,684 LOC)
    • 127 *.tsx files (11,659 LOC)
    • 145 *.ts files (3,256 LOC)
    • 30 *.py files (2,157 LOC)
    • 1 *.yaml files (203 LOC)
    • 2 *.toml files (64 LOC)
    • 1 *.css files (44 LOC)
    • 1 *.html files (13 LOC)
    • 1 *.sql files (12 LOC)
  • " *.go" is biggest, containing 86.62% of LOC.
  • " *.sql" is smallest, containing 0.01% of LOC.


*.go112684 LOC (86%) 1,987 files
*.tsx11659 LOC (8%) 127 files
*.ts3256 LOC (2%) 145 files
*.py2157 LOC (1%) 30 files
*.yaml203 LOC (<1%) 1 file
*.toml64 LOC (<1%) 2 files
*.css44 LOC (<1%) 1 file
*.html13 LOC (<1%) 1 file
*.sql12 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[-].*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/testing[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*/test[.].*".
  • 256 files match defined criteria (19,426 LOC, 14.9% vs. main code):
    • 239 *.go files (18,543 LOC)
    • 11 *.py files (826 LOC)
    • 5 *.sh files (34 LOC)
    • 1 *.toml files (23 LOC)
  • " *.go" is biggest, containing 95.45% of LOC.
  • " *.toml" is smallest, containing 0.12% of LOC.


*.go18543 LOC (95%) 239 files
*.py826 LOC (4%) 11 files
*.sh34 LOC (<1%) 5 files
*.toml23 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 ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
  • 10 files match defined criteria (191 LOC, 0.1% vs. main code). All matches are in *.sh files.


*.sh191 LOC (100%) 10 files
Other Code
mod
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/go[.]mod".
  • 86 files match defined criteria (27,641 LOC, 21.2% vs. main code):
    • 26 *.json files (25,388 LOC)
    • 42 *.md files (1,734 LOC)
    • 16 *.svg files (389 LOC)
    • 1 *.mod files (125 LOC)
    • 1 *.txt files (5 LOC)
  • " *.json" is biggest, containing 91.85% of LOC.
  • " *.txt" is smallest, containing 0.02% of LOC.


*.json25388 LOC (91%) 26 files
*.md1734 LOC (6%) 42 files
*.svg389 LOC (1%) 16 files
*.mod125 LOC (<1%) 1 file
*.txt5 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-07 20:29