kubernetes / minikube
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
in
mk
txt
patch
cfg
eps
spec
mod
nsi
dockerignore
lua
gitmodules
properties
  • 29 extensions are included in analyses: go, md, yaml, html, json, sh, yml, in, mk, inc, ps1, txt, patch, svg, gitignore, toml, cfg, eps, js, spec, css, mod, scss, nsi, dockerignore, h, lua, gitmodules, properties
  • 9 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (47 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (84 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (255 files).
    • exclude files with path like ".*/testdata/.*" (Test data) (108 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 ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*/static/js/.*" (JS library) (2 files).
    • exclude files with path like ".*[.]txt" (Text files) (5 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.

main52596 LOC (57%) 449 files
test21906 LOC (23%) 156 files
generated2872 LOC (3%) 1 files
build and deployment3077 LOC (3%) 78 files
other11417 LOC (12%) 53 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
nsi
in
spec
lua
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 449 files match defined criteria (52,596 lines of code, 100.0% vs. main code):
    • 357 *.go files (45,477 lines of code)
    • 24 *.yaml files (4,823 lines of code)
    • 1 *.js files (643 lines of code)
    • 5 *.toml files (369 lines of code)
    • 10 *.ps1 files (337 lines of code)
    • 23 *.html files (278 lines of code)
    • 1 *.scss files (184 lines of code)
    • 1 *.nsi files (161 lines of code)
    • 18 *.in files (141 lines of code)
    • 1 *.css files (65 lines of code)
    • 2 *.spec files (48 lines of code)
    • 1 *.lua files (38 lines of code)
    • 4 *.cfg files (26 lines of code)
    • 1 *.h files (6 lines of code)
  • " *.go" is biggest, containing 86.46% of code.
  • " *.h" is smallest, containing 0.01% of code.


*.go45477 LOC (86%) 357 files
*.yaml4823 LOC (9%) 24 files
*.js643 LOC (1%) 1 files
*.toml369 LOC (<1%) 5 files
*.ps1337 LOC (<1%) 10 files
*.html278 LOC (<1%) 23 files
*.scss184 LOC (<1%) 1 files
*.nsi161 LOC (<1%) 1 files
*.in141 LOC (<1%) 18 files
*.css65 LOC (<1%) 1 files
*.spec48 LOC (<1%) 2 files
*.lua38 LOC (<1%) 1 files
*.cfg26 LOC (<1%) 4 files
*.h6 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 ".*_test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_tests[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 156 files match defined criteria (21,906 lines of code, 41.6% vs. main code):
    • 151 *.go files (21,726 lines of code)
    • 5 *.sh files (180 lines of code)
  • " *.go" is biggest, containing 99.18% of code.
  • " *.sh" is smallest, containing 0.82% of code.


*.go21726 LOC (99%) 151 files
*.sh180 LOC (<1%) 5 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 (2,872 lines of code, 5.5% vs. main code). All matches are in *.json files.


*.json2872 LOC (100%) 1 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
mk
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 ".*[.]sh".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]mk".
    • files with paths like ".*/[.]gitmodules".
  • 78 files match defined criteria (3,077 lines of code, 5.9% vs. main code):
    • 61 *.sh files (2,416 lines of code)
    • 17 *.mk files (661 lines of code)
  • " *.sh" is biggest, containing 78.52% of code.
  • " *.mk" is smallest, containing 21.48% of code.


*.sh2416 LOC (78%) 61 files
*.mk661 LOC (21%) 17 files
Other Code
patch
mod
properties
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 ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]patch".
    • files with paths like ".*[.]properties".
  • 53 files match defined criteria (11,417 lines of code, 21.7% vs. main code):
    • 11 *.json files (4,716 lines of code)
    • 32 *.md files (4,266 lines of code)
    • 8 *.patch files (2,216 lines of code)
    • 1 *.mod files (211 lines of code)
    • 1 *.properties files (8 lines of code)
  • " *.json" is biggest, containing 41.31% of code.
  • " *.properties" is smallest, containing 0.07% of code.


*.json4716 LOC (41%) 11 files
*.md4266 LOC (37%) 32 files
*.patch2216 LOC (19%) 8 files
*.mod211 LOC (1%) 1 files
*.properties8 LOC (<1%) 1 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
  • *.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
  • *.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
  • *.toml 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
  • *.ps1 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
  • *.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
  • *.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
  • *.nsi 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
  • *.in files are analyzed with RustAnalyzer:
    • 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
  • *.css files are analyzed with CssAnalyzer:
    • 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
  • *.spec 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
  • *.lua files are analyzed with LuaAnalyzer:
    • 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
  • *.cfg files are analyzed with CfgAnalyzer:
    • 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
  • *.h files are analyzed with CppAnalyzer:
    • 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


2022-02-03 08:54