novifinancial / serde-reflection
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
csproj
tpl
mod
txt
  • 19 extensions are included in analyses: rs, java, swift, dart, cs, ts, md, go, py, toml, hpp, csproj, gitignore, tpl, yml, mod, txt, json, yaml
  • 3 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (8 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.

main14620 LOC (69%) 133 files
test5854 LOC (27%) 38 files
generated0 LOC (0%) 0 files
build and deployment36 LOC (<1%) 3 files
other653 LOC (3%) 12 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 ".*".
  • 133 files match defined criteria (14,620 lines of code, 100.0% vs. main code):
    • 26 *.rs files (9,435 lines of code)
    • 4 *.hpp files (991 lines of code)
    • 22 *.java files (890 lines of code)
    • 16 *.cs files (677 lines of code)
    • 19 *.swift files (566 lines of code)
    • 8 *.go files (539 lines of code)
    • 16 *.dart files (513 lines of code)
    • 4 *.py files (504 lines of code)
    • 12 *.ts files (400 lines of code)
    • 5 *.toml files (97 lines of code)
    • 1 *.yaml files (8 lines of code)
  • " *.rs" is biggest, containing 64.53% of code.
  • " *.yaml" is smallest, containing 0.05% of code.


*.rs9435 LOC (64%) 26 files
*.hpp991 LOC (6%) 4 files
*.java890 LOC (6%) 22 files
*.cs677 LOC (4%) 16 files
*.swift566 LOC (3%) 19 files
*.go539 LOC (3%) 8 files
*.dart513 LOC (3%) 16 files
*.py504 LOC (3%) 4 files
*.ts400 LOC (2%) 12 files
*.toml97 LOC (<1%) 5 files
*.yaml8 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.][Tt]ests/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
  • 38 files match defined criteria (5,854 lines of code, 40.0% vs. main code):
    • 26 *.rs files (4,348 lines of code)
    • 1 *.go files (648 lines of code)
    • 3 *.py files (474 lines of code)
    • 3 *.swift files (150 lines of code)
    • 3 *.dart files (149 lines of code)
    • 1 *.cs files (68 lines of code)
    • 1 *.csproj files (17 lines of code)
  • " *.rs" is biggest, containing 74.27% of code.
  • " *.csproj" is smallest, containing 0.29% of code.


*.rs4348 LOC (74%) 26 files
*.go648 LOC (11%) 1 files
*.py474 LOC (8%) 3 files
*.swift150 LOC (2%) 3 files
*.dart149 LOC (2%) 3 files
*.cs68 LOC (1%) 1 files
*.csproj17 LOC (<1%) 1 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
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 ".*[.]csproj".
  • 3 files match defined criteria (36 lines of code, 0.2% vs. main code). All matches are in *.csproj files.


*.csproj36 LOC (100%) 3 files
Other Code
tpl
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 ".*/go[.]mod".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
  • 12 files match defined criteria (653 lines of code, 4.5% vs. main code):
    • 7 *.md files (529 lines of code)
    • 1 *.json files (72 lines of code)
    • 3 *.tpl files (49 lines of code)
    • 1 *.mod files (3 lines of code)
  • " *.md" is biggest, containing 81.01% of code.
  • " *.mod" is smallest, containing 0.46% of code.


*.md529 LOC (81%) 7 files
*.json72 LOC (11%) 1 files
*.tpl49 LOC (7%) 3 files
*.mod3 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.rs 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
  • *.hpp 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
  • *.java files are analyzed with JavaAnalyzer:
    • 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 (based on package names)
  • *.cs files are analyzed with CSharpAnalyzer:
    • 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 (based on namespace heuristics)
  • *.swift files are analyzed with SwiftAnalyzer:
    • 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
  • *.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
  • *.dart 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
  • *.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
  • *.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
  • *.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
  • *.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


2022-04-16 07:05