JetBrains / go-code-samples
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
http
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.

main3227 LOC (62%) 68 files
test904 LOC (17%) 16 files
generated102 LOC (1%) 1 file
build and deployment0 LOC (0%) 0 files
other916 LOC (17%) 39 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 ".*".
  • 68 files match defined criteria (3,227 LOC, 100.0% vs. main code):
    • 36 *.go files (2,287 LOC)
    • 17 *.js files (718 LOC)
    • 7 *.html files (134 LOC)
    • 7 *.sql files (81 LOC)
    • 1 *.yaml files (7 LOC)
  • " *.go" is biggest, containing 70.87% of LOC.
  • " *.yaml" is smallest, containing 0.22% of LOC.


*.go2287 LOC (70%) 36 files
*.js718 LOC (22%) 17 files
*.html134 LOC (4%) 7 files
*.sql81 LOC (2%) 7 files
*.yaml7 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
http
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/mock[a-zA-Z0-9_\- ]+/.*".
  • 16 files match defined criteria (904 LOC, 28.0% vs. main code):
    • 13 *.go files (698 LOC)
    • 3 *.http files (206 LOC)
  • " *.go" is biggest, containing 77.21% of LOC.
  • " *.http" is smallest, containing 22.79% of LOC.


*.go698 LOC (77%) 13 files
*.http206 LOC (22%) 3 files
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 ".*/package[-]lock[.]json".
  • 1 file matches defined criteria (102 LOC, 3.2% vs. main code). All matches are in *.json files.


*.json102 LOC (100%) 1 file
Other Code
mod
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 ".*/[.]gitignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]txt".
  • 39 files match defined criteria (916 LOC, 28.4% vs. main code):
    • 7 *.go files (374 LOC)
    • 6 *.json files (240 LOC)
    • 11 *.mod files (207 LOC)
    • 9 *.md files (48 LOC)
    • 3 *.sql files (34 LOC)
    • 1 *.yaml files (7 LOC)
    • 2 *.txt files (6 LOC)
  • " *.go" is biggest, containing 40.83% of LOC.
  • " *.txt" is smallest, containing 0.66% of LOC.


*.go374 LOC (40%) 7 files
*.json240 LOC (26%) 6 files
*.mod207 LOC (22%) 11 files
*.md48 LOC (5%) 9 files
*.sql34 LOC (3%) 3 files
*.yaml7 LOC (<1%) 1 file
*.txt6 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2026-01-18 17:26