microsoft / libHttpClient
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
vcxproj
filters
props
txt
cmd
plist
xaml
cmake
gitattributes
csproj
gitmodules
properties
  • 27 extensions are included in analyses: h, cpp, vcxproj, filters, props, md, yml, txt, cmd, plist, hpp, xaml, mm, gradle, gitignore, cmake, java, xml, json, cs, gitattributes, bat, swift, csproj, gitmodules, bash, properties
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (6 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (1 file).
    • 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) (7 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.

main47473 LOC (65%) 213 files
test4493 LOC (6%) 24 files
generated0 LOC (0%) 0 files
build and deployment239 LOC (<1%) 7 files
other20509 LOC (28%) 111 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
filters
vcxproj
props
cmake
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 213 files match defined criteria (47,473 lines of code, 100.0% vs. main code):
    • 44 *.cpp files (12,367 lines of code)
    • 23 *.filters files (11,769 lines of code)
    • 6 *.hpp files (7,781 lines of code)
    • 29 *.vcxproj files (7,060 lines of code)
    • 70 *.h files (6,286 lines of code)
    • 2 *.cs files (429 lines of code)
    • 10 *.props files (407 lines of code)
    • 5 *.mm files (395 lines of code)
    • 8 *.yml files (353 lines of code)
    • 3 *.java files (212 lines of code)
    • 4 *.cmake files (166 lines of code)
    • 7 *.cmd files (156 lines of code)
    • 1 *.bash files (90 lines of code)
    • 1 *.swift files (2 lines of code)
  • " *.cpp" is biggest, containing 26.05% of code.
  • " *.swift" is smallest, containing 0% of code.


*.cpp12367 LOC (26%) 44 files
*.filters11769 LOC (24%) 23 files
*.hpp7781 LOC (16%) 6 files
*.vcxproj7060 LOC (14%) 29 files
*.h6286 LOC (13%) 70 files
*.cs429 LOC (<1%) 2 files
*.props407 LOC (<1%) 10 files
*.mm395 LOC (<1%) 5 files
*.yml353 LOC (<1%) 8 files
*.java212 LOC (<1%) 3 files
*.cmake166 LOC (<1%) 4 files
*.cmd156 LOC (<1%) 7 files
*.bash90 LOC (<1%) 1 files
*.swift2 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/UnitTests?/.*".
    • files with any line of content like ".*/simpletest/.*".
    • files with paths like ".*UnitTests/.*".
  • 24 files match defined criteria (4,493 lines of code, 9.5% vs. main code):
    • 13 *.cpp files (3,864 lines of code)
    • 11 *.h files (629 lines of code)
  • " *.cpp" is biggest, containing 86% of code.
  • " *.h" is smallest, containing 14% of code.


*.cpp3864 LOC (86%) 13 files
*.h629 LOC (13%) 11 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 ".*/[.]gitmodules".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]bat".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]csproj".
  • 7 files match defined criteria (239 lines of code, 0.5% vs. main code):
    • 5 *.gradle files (108 lines of code)
    • 1 *.bat files (78 lines of code)
    • 1 *.csproj files (53 lines of code)
  • " *.gradle" is biggest, containing 45.19% of code.
  • " *.csproj" is smallest, containing 22.18% of code.


*.gradle108 LOC (45%) 5 files
*.bat78 LOC (32%) 1 files
*.csproj53 LOC (22%) 1 files
Other Code
vcxproj
filters
xaml
plist
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 ".*[.]properties".
    • files with paths like ".*[.]plist".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 111 files match defined criteria (20,509 lines of code, 43.2% vs. main code):
    • 31 *.cpp files (14,041 lines of code)
    • 36 *.h files (2,944 lines of code)
    • 11 *.vcxproj files (2,583 lines of code)
    • 7 *.filters files (401 lines of code)
    • 9 *.md files (203 lines of code)
    • 6 *.xaml files (158 lines of code)
    • 6 *.plist files (104 lines of code)
    • 2 *.json files (55 lines of code)
    • 3 *.xml files (20 lines of code)
  • " *.cpp" is biggest, containing 68.46% of code.
  • " *.xml" is smallest, containing 0.1% of code.


*.cpp14041 LOC (68%) 31 files
*.h2944 LOC (14%) 36 files
*.vcxproj2583 LOC (12%) 11 files
*.filters401 LOC (1%) 7 files
*.md203 LOC (<1%) 9 files
*.xaml158 LOC (<1%) 6 files
*.plist104 LOC (<1%) 6 files
*.json55 LOC (<1%) 2 files
*.xml20 LOC (<1%) 3 files
Analyzers
Info about analyzers used for source code examinations.
  • *.cpp files are analyzed with CppAnalyzer:
    • 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
  • *.filters 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
  • *.hpp files are analyzed with CppAnalyzer:
    • 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
  • *.vcxproj 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
  • *.h files are analyzed with CppAnalyzer:
    • 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
  • *.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)
  • *.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
  • *.mm files are analyzed with CppAnalyzer:
    • 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
  • *.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
  • *.java files are analyzed with JavaAnalyzer:
    • 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 package names)
  • *.cmake 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
  • *.bash files are analyzed with ShellAnalyzer:
    • 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
  • *.swift files are analyzed with SwiftAnalyzer:
    • 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-30 14:59