Linux / Documentation
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
vim
asc
awk
  • 15 extensions are included in analyses: html, rst, yaml, txt, svg, py, json, sh, pl, css, c, gitignore, vim, asc, awk
  • 4 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/target/.*" (Compiled files) (5 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (3 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).
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.

main771048 LOC (94%) 7566 files
test486 LOC (<1%) 4 files
generated0 LOC (0%) 0 files
build and deployment881 LOC (<1%) 9 files
other40440 LOC (4%) 59 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
txt
asc
awk
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 7566 files match defined criteria (771,048 lines of code, 100.0% vs. main code):
    • 2,983 *.rst files (466,938 lines of code)
    • 2,331 *.yaml files (171,433 lines of code)
    • 2,226 *.txt files (128,231 lines of code)
    • 16 *.py files (1,857 lines of code)
    • 4 *.pl files (1,231 lines of code)
    • 1 *.asc files (968 lines of code)
    • 2 *.c files (163 lines of code)
    • 1 *.awk files (137 lines of code)
    • 2 *.css files (90 lines of code)
  • " *.rst" is biggest, containing 60.56% of code.
  • " *.css" is smallest, containing 0.01% of code.


*.rst466938 LOC (60%) 2983 files
*.yaml171433 LOC (22%) 2331 files
*.txt128231 LOC (16%) 2226 files
*.py1857 LOC (<1%) 16 files
*.pl1231 LOC (<1%) 4 files
*.asc968 LOC (<1%) 1 files
*.c163 LOC (<1%) 2 files
*.awk137 LOC (<1%) 1 files
*.css90 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 ".*_test[.].*".
    • files with paths like ".*/test_.*".
  • 4 files match defined criteria (486 lines of code, 0.1% vs. main code). All matches are in *.rst files.


*.rst486 LOC (100%) 4 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".
  • 9 files match defined criteria (881 lines of code, 0.1% vs. main code). All matches are in *.sh files.


*.sh881 LOC (100%) 9 files
Other Code
vim
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]vim".
    • files with paths like ".*/[.]gitignore".
  • 59 files match defined criteria (40,440 lines of code, 5.2% vs. main code):
    • 58 *.svg files (40,401 lines of code)
    • 1 *.vim files (39 lines of code)
  • " *.svg" is biggest, containing 99.9% of code.
  • " *.vim" is smallest, containing 0.1% of code.


*.svg40401 LOC (99%) 58 files
*.vim39 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.rst 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
  • *.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
  • *.txt 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
  • *.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
  • *.pl files are analyzed with PerlAnalyzer:
    • 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
  • *.asc 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
  • *.c files are analyzed with CStyleAnalyzer:
    • 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
  • *.awk 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
  • *.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


2022-02-04 08:58