microsoft / appcenter-sdk-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
xaml
txt
plist
nuspec
storyboard
resx
cake
shproj
axml
cfg
cmd
targets
gitattributes
  • 24 extensions are included in analyses: cs, csproj, xaml, xml, json, txt, plist, sh, nuspec, storyboard, resx, cake, shproj, axml, md, cfg, ps1, xib, cmd, targets, gitignore, gitattributes, yml, yaml
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (7 files).
    • exclude files with path like ".*[.]resx" (The resx resource files) (10 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) (21 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.

main28145 LOC (50%) 477 files
test9242 LOC (16%) 101 files
generated2783 LOC (5%) 59 files
build and deployment6306 LOC (11%) 85 files
other8989 LOC (16%) 101 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
xaml
cake
axml
cmd
shproj
targets
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 477 files match defined criteria (28,145 lines of code, 100.0% vs. main code):
    • 390 *.cs files (23,873 lines of code)
    • 44 *.xaml files (1,530 lines of code)
    • 9 *.cake files (1,226 lines of code)
    • 1 *.yaml files (648 lines of code)
    • 9 *.axml files (401 lines of code)
    • 4 *.ps1 files (239 lines of code)
    • 4 *.cmd files (102 lines of code)
    • 8 *.shproj files (98 lines of code)
    • 3 *.targets files (18 lines of code)
    • 5 *.cfg files (10 lines of code)
  • " *.cs" is biggest, containing 84.82% of code.
  • " *.cfg" is smallest, containing 0.04% of code.


*.cs23873 LOC (84%) 390 files
*.xaml1530 LOC (5%) 44 files
*.cake1226 LOC (4%) 9 files
*.yaml648 LOC (2%) 1 files
*.axml401 LOC (1%) 9 files
*.ps1239 LOC (<1%) 4 files
*.cmd102 LOC (<1%) 4 files
*.shproj98 LOC (<1%) 8 files
*.targets18 LOC (<1%) 3 files
*.cfg10 LOC (<1%) 5 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
shproj
xaml
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 101 files match defined criteria (9,242 lines of code, 32.8% vs. main code):
    • 88 *.cs files (7,806 lines of code)
    • 11 *.csproj files (1,416 lines of code)
    • 1 *.shproj files (13 lines of code)
    • 1 *.xaml files (7 lines of code)
  • " *.cs" is biggest, containing 84.46% of code.
  • " *.xaml" is smallest, containing 0.08% of code.


*.cs7806 LOC (84%) 88 files
*.csproj1416 LOC (15%) 11 files
*.shproj13 LOC (<1%) 1 files
*.xaml7 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 ".*[.]designer[.](cs|vb)".
    • files with paths like ".*[.]cs" AND any line of content like "[/][/][ ]*".
    • files with paths like ".*/generated/.*".
  • 59 files match defined criteria (2,783 lines of code, 9.9% vs. main code). All matches are in *.cs files.


*.cs2783 LOC (100%) 59 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]nuspec".
  • 85 files match defined criteria (6,306 lines of code, 22.4% vs. main code):
    • 58 *.csproj files (5,390 lines of code)
    • 13 *.nuspec files (571 lines of code)
    • 14 *.sh files (345 lines of code)
  • " *.csproj" is biggest, containing 85.47% of code.
  • " *.sh" is smallest, containing 5.47% of code.


*.csproj5390 LOC (85%) 58 files
*.nuspec571 LOC (9%) 13 files
*.sh345 LOC (5%) 14 files
Other Code
storyboard
plist
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.]xib".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 101 files match defined criteria (8,989 lines of code, 31.9% vs. main code):
    • 12 *.storyboard files (3,635 lines of code)
    • 43 *.xml files (2,246 lines of code)
    • 2 *.md files (1,075 lines of code)
    • 22 *.json files (1,020 lines of code)
    • 4 *.xib files (541 lines of code)
    • 18 *.plist files (472 lines of code)
  • " *.storyboard" is biggest, containing 40.44% of code.
  • " *.plist" is smallest, containing 5.25% of code.


*.storyboard3635 LOC (40%) 12 files
*.xml2246 LOC (24%) 43 files
*.md1075 LOC (11%) 2 files
*.json1020 LOC (11%) 22 files
*.xib541 LOC (6%) 4 files
*.plist472 LOC (5%) 18 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)
  • *.xaml 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
  • *.cake 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)
  • *.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
  • *.axml 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
  • *.cmd 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
  • *.shproj 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
  • *.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
  • *.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 13:56