apache / servicecomb-service-center
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
mod
txt
tpl
proto
editorconfig
gitmodules
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.

main46994 LOC (57%) 665 files
test27207 LOC (33%) 202 files
generated0 LOC (0%) 0 files
build and deployment484 LOC (<1%) 26 files
other7685 LOC (9%) 100 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 665 files match defined criteria (46,994 LOC, 100.0% vs. main code):
    • 527 *.go files (39,410 LOC)
    • 43 *.ts files (2,588 LOC)
    • 28 *.js files (2,039 LOC)
    • 37 *.html files (1,948 LOC)
    • 1 *.css files (368 LOC)
    • 21 *.less files (298 LOC)
    • 6 *.yaml files (294 LOC)
    • 2 *.proto files (49 LOC)
  • " *.go" is biggest, containing 83.86% of LOC.
  • " *.proto" is smallest, containing 0.1% of LOC.


*.go39410 LOC (83%) 527 files
*.ts2588 LOC (5%) 43 files
*.js2039 LOC (4%) 28 files
*.html1948 LOC (4%) 37 files
*.css368 LOC (<1%) 1 file
*.less298 LOC (<1%) 21 files
*.yaml294 LOC (<1%) 6 files
*.proto49 LOC (<1%) 2 files
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 ".*/[Tt]est/.*".
  • 202 files match defined criteria (27,207 LOC, 57.9% vs. main code):
    • 200 *.go files (27,149 LOC)
    • 2 *.sh files (58 LOC)
  • " *.go" is biggest, containing 99.79% of LOC.
  • " *.sh" is smallest, containing 0.21% of LOC.


*.go27149 LOC (99%) 200 files
*.sh58 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 ".*[.]sh".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/docker[-]compose[.]yml".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/docker[-]compose[.]yaml".
  • 26 files match defined criteria (484 LOC, 1.0% vs. main code):
    • 21 *.sh files (392 LOC)
    • 2 *.yml files (50 LOC)
    • 2 *.bat files (30 LOC)
    • 1 *.yaml files (12 LOC)
  • " *.sh" is biggest, containing 80.99% of LOC.
  • " *.yaml" is smallest, containing 2.48% of LOC.


*.sh392 LOC (80%) 21 files
*.yml50 LOC (10%) 2 files
*.bat30 LOC (6%) 2 files
*.yaml12 LOC (2%) 1 file
Other Code
mod
tpl
txt
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 ".*/go[.]mod".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
  • 100 files match defined criteria (7,685 LOC, 16.4% vs. main code):
    • 22 *.json files (4,719 LOC)
    • 30 *.yaml files (1,122 LOC)
    • 18 *.md files (723 LOC)
    • 5 *.mod files (437 LOC)
    • 7 *.go files (335 LOC)
    • 11 *.sh files (128 LOC)
    • 3 *.tpl files (97 LOC)
    • 2 *.txt files (77 LOC)
    • 2 *.yml files (47 LOC)
  • " *.json" is biggest, containing 61.41% of LOC.
  • " *.yml" is smallest, containing 0.61% of LOC.


*.json4719 LOC (61%) 22 files
*.yaml1122 LOC (14%) 30 files
*.md723 LOC (9%) 18 files
*.mod437 LOC (5%) 5 files
*.go335 LOC (4%) 7 files
*.sh128 LOC (1%) 11 files
*.tpl97 LOC (1%) 3 files
*.txt77 LOC (1%) 2 files
*.yml47 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2023-08-10 18:21