aws / aws-logging-dotnet
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
cshtml
txt
proj
  • 12 extensions are included in analyses: cs, csproj, json, js, md, css, cshtml, svg, txt, yml, gitignore, proj
  • 12 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (11 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 ".*[.]min[.]js" (Minimized JS library) (1 file).
    • exclude files with path like ".*/dist/.*" (Distributions) (6 files).
    • exclude files with path like "(?i).*/jquery.*[.]js" (jQuery files) (1 file).
    • exclude files with path like ".*/bootstrap[.](js|css|less|scss|styl)" (Bootstrap) (0 files).
    • exclude files with path like ".*/jquery([^.]*)\.validate(\.unobtrusive)?\.js" (jQuery validation plugin (MS bundles this with asp.net mvc)) (0 files).
    • exclude files with path like ".*jquery[.].*[.]js" (jQuery library) (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 ".*/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.

main1670 LOC (30%) 21 files
test1867 LOC (34%) 39 files
generated0 LOC (0%) 0 files
build and deployment167 LOC (3%) 5 files
other1758 LOC (32%) 61 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 21 files match defined criteria (1,670 lines of code, 100.0% vs. main code):
    • 20 *.cs files (1,643 lines of code)
    • 1 *.proj files (27 lines of code)
  • " *.cs" is biggest, containing 98.38% of code.
  • " *.proj" is smallest, containing 1.62% of code.


*.cs1643 LOC (98%) 20 files
*.proj27 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]est/.*".
    • files with paths like ".*[.][Tt]ests/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*TestUtils/.*".
    • files with paths like ".*UnitTests/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 39 files match defined criteria (1,867 lines of code, 111.8% vs. main code):
    • 31 *.cs files (1,636 lines of code)
    • 8 *.csproj files (231 lines of code)
  • " *.cs" is biggest, containing 87.63% of code.
  • " *.csproj" is smallest, containing 12.37% of code.


*.cs1636 LOC (87%) 31 files
*.csproj231 LOC (12%) 8 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 ".*[.]csproj".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 5 files match defined criteria (167 lines of code, 10.0% vs. main code). All matches are in *.csproj files.


*.csproj167 LOC (100%) 5 files
Other Code
csproj
cshtml
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 ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
  • 61 files match defined criteria (1,758 lines of code, 105.3% vs. main code):
    • 6 *.md files (526 lines of code)
    • 18 *.cs files (447 lines of code)
    • 10 *.csproj files (413 lines of code)
    • 18 *.json files (229 lines of code)
    • 6 *.cshtml files (118 lines of code)
    • 2 *.css files (24 lines of code)
    • 1 *.js files (1 lines of code)
  • " *.md" is biggest, containing 29.92% of code.
  • " *.js" is smallest, containing 0.06% of code.


*.md526 LOC (29%) 6 files
*.cs447 LOC (25%) 18 files
*.csproj413 LOC (23%) 10 files
*.json229 LOC (13%) 18 files
*.cshtml118 LOC (6%) 6 files
*.css24 LOC (1%) 2 files
*.js1 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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)
  • *.proj files are analyzed with XmlAnalyzer:
    • 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-01-31 07:17