microsoft / PowerShell-DSC-for-Linux
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
reg
txt
in
asc
mak
pub
cmake
y
  • 26 extensions are included in analyses: py, h, c, rb, cpp, reg, txt, ps1, sh, psd1, xml, json, md, in, hpp, inc, asc, mak, pub, cmake, psm1, yml, htm, gitignore, cs, y
  • 3 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).
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.

main232654 LOC (85%) 738 files
test36356 LOC (13%) 93 files
generated0 LOC (0%) 0 files
build and deployment1404 LOC (<1%) 24 files
other2302 LOC (<1%) 40 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
y
cmake
reg
asc
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 738 files match defined criteria (232,654 lines of code, 100.0% vs. main code):
    • 152 *.c files (106,575 lines of code)
    • 226 *.py files (51,165 lines of code)
    • 185 *.h files (47,867 lines of code)
    • 36 *.cpp files (9,977 lines of code)
    • 53 *.rb files (7,043 lines of code)
    • 2 *.xml files (2,297 lines of code)
    • 6 *.in files (2,156 lines of code)
    • 1 *.cs files (1,414 lines of code)
    • 1 *.y files (1,288 lines of code)
    • 4 *.hpp files (834 lines of code)
    • 5 *.inc files (673 lines of code)
    • 22 *.psd1 files (484 lines of code)
    • 6 *.ps1 files (418 lines of code)
    • 2 *.cmake files (298 lines of code)
    • 35 *.reg files (129 lines of code)
    • 2 *.asc files (36 lines of code)
  • " *.c" is biggest, containing 45.81% of code.
  • " *.asc" is smallest, containing 0.02% of code.


*.c106575 LOC (45%) 152 files
*.py51165 LOC (21%) 226 files
*.h47867 LOC (20%) 185 files
*.cpp9977 LOC (4%) 36 files
*.rb7043 LOC (3%) 53 files
*.xml2297 LOC (<1%) 2 files
*.in2156 LOC (<1%) 6 files
*.cs1414 LOC (<1%) 1 files
*.y1288 LOC (<1%) 1 files
*.hpp834 LOC (<1%) 4 files
*.inc673 LOC (<1%) 5 files
*.psd1484 LOC (<1%) 22 files
*.ps1418 LOC (<1%) 6 files
*.cmake298 LOC (<1%) 2 files
*.reg129 LOC (<1%) 35 files
*.asc36 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
pub
asc
mak
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*/[Tt]est/.*".
  • 93 files match defined criteria (36,356 lines of code, 15.6% vs. main code):
    • 24 *.py files (15,811 lines of code)
    • 12 *.c files (8,023 lines of code)
    • 10 *.cpp files (5,650 lines of code)
    • 14 *.h files (4,139 lines of code)
    • 18 *.ps1 files (1,455 lines of code)
    • 1 *.psm1 files (825 lines of code)
    • 2 *.hpp files (259 lines of code)
    • 3 *.pub files (87 lines of code)
    • 5 *.xml files (60 lines of code)
    • 3 *.asc files (30 lines of code)
    • 1 *.mak files (17 lines of code)
  • " *.py" is biggest, containing 43.49% of code.
  • " *.mak" is smallest, containing 0.05% of code.


*.py15811 LOC (43%) 24 files
*.c8023 LOC (22%) 12 files
*.cpp5650 LOC (15%) 10 files
*.h4139 LOC (11%) 14 files
*.ps11455 LOC (4%) 18 files
*.psm1825 LOC (2%) 1 files
*.hpp259 LOC (<1%) 2 files
*.pub87 LOC (<1%) 3 files
*.xml60 LOC (<1%) 5 files
*.asc30 LOC (<1%) 3 files
*.mak17 LOC (<1%) 1 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
mak
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]mak".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]sh".
  • 24 files match defined criteria (1,404 lines of code, 0.6% vs. main code):
    • 22 *.sh files (1,398 lines of code)
    • 2 *.mak files (6 lines of code)
  • " *.sh" is biggest, containing 99.57% of code.
  • " *.mak" is smallest, containing 0.43% of code.


*.sh1398 LOC (99%) 22 files
*.mak6 LOC (<1%) 2 files
Other Code
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
  • 40 files match defined criteria (2,302 lines of code, 1.0% vs. main code):
    • 27 *.txt files (908 lines of code)
    • 7 *.json files (856 lines of code)
    • 6 *.md files (538 lines of code)
  • " *.txt" is biggest, containing 39.44% of code.
  • " *.md" is smallest, containing 23.37% of code.


*.txt908 LOC (39%) 27 files
*.json856 LOC (37%) 7 files
*.md538 LOC (23%) 6 files
Analyzers
Info about analyzers used for source code examinations.
  • *.c files are analyzed with CStyleAnalyzer:
    • 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
  • *.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
  • *.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
  • *.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
  • *.rb files are analyzed with RubyAnalyzer:
    • 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
    • Basic heuristic 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
  • *.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
  • *.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)
  • *.y 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
  • *.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
  • *.inc files are analyzed with PhpAnalyzer:
    • 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
  • *.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
  • *.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
  • *.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
  • *.reg 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
  • *.asc 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


2022-01-30 07:36