kubernetes / website
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
properties
mod
webmanifest
dockerignore
editorconfig
gitmodules
  • 22 extensions are included in analyses: md, yaml, html, svg, toml, css, js, txt, json, py, sh, scss, properties, go, yml, mod, webmanifest, dockerignore, xml, editorconfig, gitignore, gitmodules
  • 9 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (10 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (3573 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 ".*/docs?/_?(build|themes?|templates?|static)/.*" (Sphinx) (0 files).
    • exclude files with path like ".*[.]txt" (Text files) (2 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*/static/js/.*" (JS library) (6 files).
    • exclude files with path like ".*/bootstrap[-].*" (Library) (0 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.

main29949 LOC (19%) 306 files
test38 LOC (<1%) 1 files
generated996 LOC (<1%) 1 files
build and deployment177 LOC (<1%) 6 files
other122603 LOC (79%) 1793 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
webmanifest
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 306 files match defined criteria (29,949 lines of code, 100.0% vs. main code):
    • 192 *.html files (9,436 lines of code)
    • 28 *.css files (7,716 lines of code)
    • 38 *.toml files (5,363 lines of code)
    • 4 *.js files (3,218 lines of code)
    • 9 *.scss files (1,804 lines of code)
    • 26 *.yaml files (1,638 lines of code)
    • 6 *.py files (702 lines of code)
    • 2 *.yml files (50 lines of code)
    • 1 *.webmanifest files (22 lines of code)
  • " *.html" is biggest, containing 31.51% of code.
  • " *.webmanifest" is smallest, containing 0.07% of code.


*.html9436 LOC (31%) 192 files
*.css7716 LOC (25%) 28 files
*.toml5363 LOC (17%) 38 files
*.js3218 LOC (10%) 4 files
*.scss1804 LOC (6%) 9 files
*.yaml1638 LOC (5%) 26 files
*.py702 LOC (2%) 6 files
*.yml50 LOC (<1%) 2 files
*.webmanifest22 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 any line of content like ".*/simpletest/.*".
  • 1 file matches defined criteria (38 lines of code, 0.1% vs. main code). All matches are in *.sh files.


*.sh38 LOC (100%) 1 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 ".*/generated/.*".
    • files with paths like ".*/package[-]lock[.]json".
  • 1 file matches defined criteria (996 lines of code, 3.3% vs. main code). All matches are in *.json files.


*.json996 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 ".*/[.]gitmodules".
    • files with paths like ".*/package[.]json".
  • 6 files match defined criteria (177 lines of code, 0.6% vs. main code). All matches are in *.sh files.


*.sh177 LOC (100%) 6 files
Other Code
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 ".*[.]txt".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 1793 files match defined criteria (122,603 lines of code, 409.4% vs. main code):
    • 624 *.md files (49,872 lines of code)
    • 19 *.svg files (44,989 lines of code)
    • 1,097 *.yaml files (24,055 lines of code)
    • 6 *.go files (1,920 lines of code)
    • 15 *.json files (1,220 lines of code)
    • 11 *.py files (185 lines of code)
    • 4 *.sh files (127 lines of code)
    • 1 *.mod files (112 lines of code)
    • 7 *.js files (56 lines of code)
    • 8 *.properties files (36 lines of code)
    • 1 *.xml files (31 lines of code)
  • " *.md" is biggest, containing 40.68% of code.
  • " *.xml" is smallest, containing 0.03% of code.


*.md49872 LOC (40%) 624 files
*.svg44989 LOC (36%) 19 files
*.yaml24055 LOC (19%) 1097 files
*.go1920 LOC (1%) 6 files
*.json1220 LOC (<1%) 15 files
*.py185 LOC (<1%) 11 files
*.sh127 LOC (<1%) 4 files
*.mod112 LOC (<1%) 1 files
*.js56 LOC (<1%) 7 files
*.properties36 LOC (<1%) 8 files
*.xml31 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.py files are analyzed with PythonAnalyzer:
    • 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
  • *.yml 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
  • *.webmanifest files are analyzed with JsonAnalyzer:
    • 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


2022-02-03 08:53