aws / aws-lambda-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
fs
fsproj
txt
cshtml
razor
nuspec
shproj
proj
props
cmd
  • 27 extensions are included in analyses: cs, json, csproj, md, fs, fsproj, ps1, txt, js, cshtml, css, razor, yml, psm1, xml, nuspec, svg, psd1, ps1xml, shproj, yaml, bat, sh, gitignore, proj, props, cmd
  • 12 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (132 files).
    • exclude files with path like ".*[.]min[.]js" (Minimized JS library) (3 files).
    • exclude files with path like ".*/dist/.*" (Distributions) (18 files).
    • exclude files with path like "(?i).*/jquery.*[.]js" (jQuery files) (3 files).
    • 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 ".*/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 ".*[.]txt" (Text files) (32 files).
    • exclude files with path like ".*/bootstrap[-].*" (Library) (0 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
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.

main28263 LOC (6%) 615 files
test387527 LOC (87%) 440 files
generated4083 LOC (<1%) 2 files
build and deployment1708 LOC (<1%) 106 files
other22730 LOC (5%) 662 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
fs
fsproj
razor
cshtml
proj
props
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 615 files match defined criteria (28,263 lines of code, 100.0% vs. main code):
    • 442 *.cs files (21,304 lines of code)
    • 16 *.ps1 files (1,917 lines of code)
    • 60 *.fs files (1,854 lines of code)
    • 42 *.fsproj files (967 lines of code)
    • 12 *.razor files (750 lines of code)
    • 22 *.cshtml files (519 lines of code)
    • 8 *.css files (345 lines of code)
    • 1 *.proj files (193 lines of code)
    • 1 *.yaml files (192 lines of code)
    • 1 *.psd1 files (89 lines of code)
    • 4 *.yml files (60 lines of code)
    • 2 *.psm1 files (50 lines of code)
    • 1 *.props files (20 lines of code)
    • 3 *.js files (3 lines of code)
  • " *.cs" is biggest, containing 75.38% of code.
  • " *.js" is smallest, containing 0.01% of code.


*.cs21304 LOC (75%) 442 files
*.ps11917 LOC (6%) 16 files
*.fs1854 LOC (6%) 60 files
*.fsproj967 LOC (3%) 42 files
*.razor750 LOC (2%) 12 files
*.cshtml519 LOC (1%) 22 files
*.css345 LOC (1%) 8 files
*.proj193 LOC (<1%) 1 files
*.yaml192 LOC (<1%) 1 files
*.psd189 LOC (<1%) 1 files
*.yml60 LOC (<1%) 4 files
*.psm150 LOC (<1%) 2 files
*.props20 LOC (<1%) 1 files
*.js3 LOC (<1%) 3 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
fs
fsproj
shproj
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.][Tt]ests/.*".
    • files with paths like ".*[.][Tt]est/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*UnitTests/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 440 files match defined criteria (387,527 lines of code, 1371.1% vs. main code):
    • 2 *.ps1xml files (358,904 lines of code)
    • 206 *.cs files (15,051 lines of code)
    • 42 *.ps1 files (7,872 lines of code)
    • 93 *.csproj files (1,984 lines of code)
    • 44 *.fs files (1,387 lines of code)
    • 43 *.fsproj files (1,016 lines of code)
    • 2 *.psd1 files (630 lines of code)
    • 2 *.psm1 files (535 lines of code)
    • 2 *.yml files (65 lines of code)
    • 1 *.yaml files (48 lines of code)
    • 2 *.shproj files (24 lines of code)
    • 1 *.cmd files (11 lines of code)
  • " *.ps1xml" is biggest, containing 92.61% of code.
  • " *.cmd" is smallest, containing 0% of code.


*.ps1xml358904 LOC (92%) 2 files
*.cs15051 LOC (3%) 206 files
*.ps17872 LOC (2%) 42 files
*.csproj1984 LOC (<1%) 93 files
*.fs1387 LOC (<1%) 44 files
*.fsproj1016 LOC (<1%) 43 files
*.psd1630 LOC (<1%) 2 files
*.psm1535 LOC (<1%) 2 files
*.yml65 LOC (<1%) 2 files
*.yaml48 LOC (<1%) 1 files
*.shproj24 LOC (<1%) 2 files
*.cmd11 LOC (<1%) 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 ".*/package[-]lock[.]json".
    • files with paths like ".*[.]cs" AND any line of content like "[/][/][ ]*".
  • 2 files match defined criteria (4,083 lines of code, 14.4% vs. main code):
    • 1 *.json files (2,946 lines of code)
    • 1 *.cs files (1,137 lines of code)
  • " *.json" is biggest, containing 72.15% of code.
  • " *.cs" is smallest, containing 27.85% of code.


*.json2946 LOC (72%) 1 files
*.cs1137 LOC (27%) 1 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
nuspec
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*[.]nuspec".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 106 files match defined criteria (1,708 lines of code, 6.0% vs. main code):
    • 101 *.csproj files (1,553 lines of code)
    • 1 *.sh files (79 lines of code)
    • 4 *.nuspec files (76 lines of code)
  • " *.csproj" is biggest, containing 90.93% of code.
  • " *.nuspec" is smallest, containing 4.45% of code.


*.csproj1553 LOC (90%) 101 files
*.sh79 LOC (4%) 1 files
*.nuspec76 LOC (4%) 4 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]json".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 662 files match defined criteria (22,730 lines of code, 80.4% vs. main code):
    • 487 *.json files (14,339 lines of code)
    • 155 *.md files (7,395 lines of code)
    • 1 *.svg files (543 lines of code)
    • 1 *.xml files (226 lines of code)
    • 17 *.ps1 files (225 lines of code)
    • 1 *.bat files (2 lines of code)
  • " *.json" is biggest, containing 63.08% of code.
  • " *.bat" is smallest, containing 0.01% of code.


*.json14339 LOC (63%) 487 files
*.md7395 LOC (32%) 155 files
*.svg543 LOC (2%) 1 files
*.xml226 LOC (<1%) 1 files
*.ps1225 LOC (<1%) 17 files
*.bat2 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)
  • *.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
  • *.fs 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
  • *.fsproj 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
  • *.razor 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
  • *.cshtml 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
  • *.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
  • *.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
  • *.psd1 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
  • *.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
  • *.psm1 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
  • *.props 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
  • *.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


2022-01-31 07:18