aliyun / alibabacloud-nls-cpp-sdk
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
txt
mk
resx
csproj
in
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.

main29819 LOC (57%) 189 files
test0 LOC (0%) 0 files
generated46 LOC (<1%) 2 files
build and deployment2201 LOC (4%) 11 files
other19570 LOC (37%) 33 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
vcxproj
filters
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 189 files match defined criteria (29,819 LOC, 100.0% vs. main code):
    • 61 *.cpp files (17,250 LOC)
    • 83 *.h files (6,108 LOC)
    • 25 *.cs files (3,899 LOC)
    • 6 *.vcxproj files (1,430 LOC)
    • 6 *.cmake files (624 LOC)
    • 6 *.filters files (344 LOC)
    • 1 *.hpp files (140 LOC)
    • 1 *.in files (24 LOC)
  • " *.cpp" is biggest, containing 57.85% of LOC.
  • " *.in" is smallest, containing 0.08% of LOC.


*.cpp17250 LOC (57%) 61 files
*.h6108 LOC (20%) 83 files
*.cs3899 LOC (13%) 25 files
*.vcxproj1430 LOC (4%) 6 files
*.cmake624 LOC (2%) 6 files
*.filters344 LOC (1%) 6 files
*.hpp140 LOC (<1%) 1 file
*.in24 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 ".*[.]cs" AND any line of content like "[/][/][ ]*".
  • 2 files match defined criteria (46 LOC, 0.2% vs. main code). All matches are in *.cs files.


*.cs46 LOC (100%) 2 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 ".*[.]bat".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]mk".
    • files with paths like ".*[.]csproj".
  • 11 files match defined criteria (2,201 LOC, 7.4% vs. main code):
    • 6 *.bat files (1,510 LOC)
    • 3 *.sh files (463 LOC)
    • 2 *.csproj files (228 LOC)
  • " *.bat" is biggest, containing 68.61% of LOC.
  • " *.csproj" is smallest, containing 10.36% of LOC.


*.bat1510 LOC (68%) 6 files
*.sh463 LOC (21%) 3 files
*.csproj228 LOC (10%) 2 files
Other Code
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]md".
  • 33 files match defined criteria (19,570 LOC, 65.6% vs. main code):
    • 23 *.cpp files (17,875 LOC)
    • 3 *.sh files (898 LOC)
    • 4 *.txt files (527 LOC)
    • 1 *.md files (245 LOC)
    • 2 *.h files (25 LOC)
  • " *.cpp" is biggest, containing 91.34% of LOC.
  • " *.h" is smallest, containing 0.13% of LOC.


*.cpp17875 LOC (91%) 23 files
*.sh898 LOC (4%) 3 files
*.txt527 LOC (2%) 4 files
*.md245 LOC (1%) 1 file
*.h25 LOC (<1%) 2 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
  • *.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)
  • *.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
  • *.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
  • *.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
  • *.in files are analyzed with RustAnalyzer:
    • 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


2025-05-15 04:57