kubernetes / dashboard
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
xlf
txt
tpl
mod
dockerignore
editorconfig
npmrc
babelrc
mjs
  • 23 extensions are included in analyses: ts, go, html, yaml, scss, md, json, sh, yml, xlf, txt, svg, tpl, mod, js, dockerignore, editorconfig, npmrc, babelrc, gitignore, toml, cjs, mjs
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (21 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (30 files).
    • exclude files with path like ".*/git[-]history[.]txt" (Git history) (1 file).
    • exclude files with path like ".*/git[-][a-zA-Z0-9_]+[.]txt" (Git data exports for sokrates analyses) (0 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (1 file).
    • exclude files with path like ".*/extern(al)?/.*" (Dependencies) (3 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (4 files).
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.

main46057 LOC (33%) 874 files
test13280 LOC (9%) 139 files
generated39328 LOC (28%) 1 files
build and deployment439 LOC (<1%) 13 files
other40333 LOC (28%) 23 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
tpl
mjs
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 874 files match defined criteria (46,057 lines of code, 100.0% vs. main code):
    • 231 *.go files (17,910 lines of code)
    • 367 *.ts files (14,863 lines of code)
    • 163 *.html files (9,216 lines of code)
    • 59 *.yaml files (2,400 lines of code)
    • 50 *.scss files (1,500 lines of code)
    • 2 *.tpl files (98 lines of code)
    • 1 *.mjs files (53 lines of code)
    • 1 *.js files (17 lines of code)
  • " *.go" is biggest, containing 38.89% of code.
  • " *.js" is smallest, containing 0.04% of code.


*.go17910 LOC (38%) 231 files
*.ts14863 LOC (32%) 367 files
*.html9216 LOC (20%) 163 files
*.yaml2400 LOC (5%) 59 files
*.scss1500 LOC (3%) 50 files
*.tpl98 LOC (<1%) 2 files
*.mjs53 LOC (<1%) 1 files
*.js17 LOC (<1%) 1 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 ".*/[Ss]pecs/.*".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*/test[-]resources/.*".
    • files with paths like ".*_test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 139 files match defined criteria (13,280 lines of code, 28.8% vs. main code):
    • 107 *.go files (11,505 lines of code)
    • 13 *.ts files (1,245 lines of code)
    • 17 *.yaml files (464 lines of code)
    • 2 *.yml files (66 lines of code)
  • " *.go" is biggest, containing 86.63% of code.
  • " *.yml" is smallest, containing 0.5% of code.


*.go11505 LOC (86%) 107 files
*.ts1245 LOC (9%) 13 files
*.yaml464 LOC (3%) 17 files
*.yml66 LOC (<1%) 2 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 (39,328 lines of code, 85.4% vs. main code). All matches are in *.json files.


*.json39328 LOC (100%) 1 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
  • 13 files match defined criteria (439 lines of code, 1.0% vs. main code). All matches are in *.sh files.


*.sh439 LOC (100%) 13 files
Other Code
mod
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 ".*[.]json".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]npmrc".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]svg".
  • 23 files match defined criteria (40,333 lines of code, 87.6% vs. main code):
    • 13 *.json files (39,907 lines of code)
    • 7 *.md files (353 lines of code)
    • 1 *.mod files (58 lines of code)
    • 2 *.svg files (15 lines of code)
  • " *.json" is biggest, containing 98.94% of code.
  • " *.svg" is smallest, containing 0.04% of code.


*.json39907 LOC (98%) 13 files
*.md353 LOC (<1%) 7 files
*.mod58 LOC (<1%) 1 files
*.svg15 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.go files are analyzed with GoLangAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Basic heuristic dependency analysis
  • *.ts files are analyzed with TypeScriptAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis
  • *.html files are analyzed with HtmlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis
  • *.yaml files are analyzed with YamlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.scss files are analyzed with ScssAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.tpl files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.mjs files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.js files are analyzed with JavaScriptAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis


2022-02-03 08:50