azure / azure-functions-host
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
csx
csproj
props
targets
proj
txt
resx
proto
gitattributes
fsx
editorconfig
shproj
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.

main54678 LOC (37%) 850 files
test64324 LOC (44%) 556 files
generated855 LOC (<1%) 5 files
build and deployment316 LOC (<1%) 9 files
other24805 LOC (17%) 245 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
targets
csx
props
proj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 850 files match defined criteria (54,678 LOC, 100.0% vs. main code):
    • 753 *.cs files (52,035 LOC)
    • 3 *.proto files (622 LOC)
    • 27 *.js files (505 LOC)
    • 11 *.targets files (414 LOC)
    • 8 *.ps1 files (347 LOC)
    • 23 *.csx files (253 LOC)
    • 17 *.props files (231 LOC)
    • 3 *.xml files (114 LOC)
    • 1 *.htm files (108 LOC)
    • 2 *.py files (33 LOC)
    • 1 *.proj files (9 LOC)
    • 1 *.psd1 files (7 LOC)
  • " *.cs" is biggest, containing 95.17% of LOC.
  • " *.psd1" is smallest, containing 0.01% of LOC.


*.cs52035 LOC (95%) 753 files
*.proto622 LOC (1%) 3 files
*.js505 LOC (<1%) 27 files
*.targets414 LOC (<1%) 11 files
*.ps1347 LOC (<1%) 8 files
*.csx253 LOC (<1%) 23 files
*.props231 LOC (<1%) 17 files
*.xml114 LOC (<1%) 3 files
*.htm108 LOC (<1%) 1 file
*.py33 LOC (<1%) 2 files
*.proj9 LOC (<1%) 1 file
*.psd17 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csx
csproj
proj
fsx
shproj
targets
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*[.][Tt]ests/.*".
    • files with paths like ".*[.]tests[.].*".
  • 556 files match defined criteria (64,324 LOC, 117.6% vs. main code):
    • 437 *.cs files (62,390 LOC)
    • 42 *.js files (812 LOC)
    • 46 *.csx files (492 LOC)
    • 19 *.csproj files (482 LOC)
    • 2 *.xml files (40 LOC)
    • 4 *.proj files (34 LOC)
    • 1 *.ps1 files (19 LOC)
    • 1 *.fsx files (16 LOC)
    • 2 *.psd1 files (15 LOC)
    • 1 *.shproj files (14 LOC)
    • 1 *.targets files (10 LOC)
  • " *.cs" is biggest, containing 96.99% of LOC.
  • " *.targets" is smallest, containing 0.02% of LOC.


*.cs62390 LOC (96%) 437 files
*.js812 LOC (1%) 42 files
*.csx492 LOC (<1%) 46 files
*.csproj482 LOC (<1%) 19 files
*.xml40 LOC (<1%) 2 files
*.proj34 LOC (<1%) 4 files
*.ps119 LOC (<1%) 1 file
*.fsx16 LOC (<1%) 1 file
*.psd115 LOC (<1%) 2 files
*.shproj14 LOC (<1%) 1 file
*.targets10 LOC (<1%) 1 file
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 "[/][/][ ]*".
  • 5 files match defined criteria (855 LOC, 1.6% vs. main code):
    • 1 *.json files (498 LOC)
    • 4 *.cs files (357 LOC)
  • " *.json" is biggest, containing 58.25% of LOC.
  • " *.cs" is smallest, containing 41.75% of LOC.


*.json498 LOC (58%) 1 file
*.cs357 LOC (41%) 4 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 ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
  • 9 files match defined criteria (316 LOC, 0.6% vs. main code). All matches are in *.csproj files.


*.csproj316 LOC (100%) 9 files
Other Code
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
  • 245 files match defined criteria (24,805 LOC, 45.4% vs. main code):
    • 233 *.json files (23,996 LOC)
    • 4 *.txt files (546 LOC)
    • 8 *.md files (263 LOC)
  • " *.json" is biggest, containing 96.74% of LOC.
  • " *.md" is smallest, containing 1.06% of LOC.


*.json23996 LOC (96%) 233 files
*.txt546 LOC (2%) 4 files
*.md263 LOC (1%) 8 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)
  • *.proto 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
  • *.targets 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
  • *.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
  • *.csx 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)
  • *.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
  • *.xml 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
  • *.htm 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
  • *.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
  • *.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
  • *.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


2025-05-06 21:13