microsoft / Service-Fabric-POA
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
props
cfg
gitattributes
txt
sfproj
  • 14 extensions are included in analyses: cs, xml, csproj, ps1, props, json, bat, cfg, gitignore, gitattributes, txt, md, yml, sfproj
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (2 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 ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (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.

main6139 LOC (86%) 66 files
test0 LOC (0%) 0 files
generated0 LOC (0%) 0 files
build and deployment397 LOC (5%) 8 files
other555 LOC (7%) 14 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
props
sfproj
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 66 files match defined criteria (6,139 lines of code, 100.0% vs. main code):
    • 55 *.cs files (5,587 lines of code)
    • 5 *.ps1 files (409 lines of code)
    • 3 *.props files (68 lines of code)
    • 1 *.sfproj files (61 lines of code)
    • 1 *.yml files (10 lines of code)
    • 1 *.cfg files (4 lines of code)
  • " *.cs" is biggest, containing 91.01% of code.
  • " *.cfg" is smallest, containing 0.07% of code.


*.cs5587 LOC (91%) 55 files
*.ps1409 LOC (6%) 5 files
*.props68 LOC (1%) 3 files
*.sfproj61 LOC (<1%) 1 files
*.yml10 LOC (<1%) 1 files
*.cfg4 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 ".*/[.]gitattributes".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*[.]bat".
  • 8 files match defined criteria (397 lines of code, 6.5% vs. main code):
    • 6 *.csproj files (330 lines of code)
    • 2 *.bat files (67 lines of code)
  • " *.csproj" is biggest, containing 83.12% of code.
  • " *.bat" is smallest, containing 16.88% of code.


*.csproj330 LOC (83%) 6 files
*.bat67 LOC (16%) 2 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 14 files match defined criteria (555 lines of code, 9.0% vs. main code):
    • 2 *.json files (219 lines of code)
    • 11 *.xml files (199 lines of code)
    • 1 *.md files (137 lines of code)
  • " *.json" is biggest, containing 39.46% of code.
  • " *.md" is smallest, containing 24.68% of code.


*.json219 LOC (39%) 2 files
*.xml199 LOC (35%) 11 files
*.md137 LOC (24%) 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
  • *.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
  • *.sfproj 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
  • *.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
  • *.cfg files are analyzed with CfgAnalyzer:
    • 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-30 23:53