microsoft / checkedc-lnt
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
txt
plist
cfg
wsgi
in
TXT
mkdn
arcconfig
  • 22 extensions are included in analyses: py, js, html, txt, rst, css, plist, json, cfg, wsgi, sql, md, in, TXT, bat, sh, mkdn, cpp, svg, gitignore, arcconfig, pl
  • 12 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 ".*/docs/.*" (Documentation) (19 files).
    • exclude files with path like ".*/docs?/_?(build|themes?|templates?|static)/.*" (Sphinx) (0 files).
    • exclude files with path like ".*/extern(al)?/.*" (Dependencies) (5 files).
    • exclude files with path like ".*/d3(\.v\d+)?([^.]*)\.js" (D3) (1 file).
    • exclude files with path like "(?i).*/jquery.*[.]js" (jQuery files) (22 files).
    • exclude files with path like ".*jquery[.].*[.]js" (jQuery library) (0 files).
    • exclude files with path like ".*[.]min[.]js" (Minimized JS library) (0 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) (27 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.

main17714 LOC (59%) 132 files
test5236 LOC (17%) 58 files
generated0 LOC (0%) 0 files
build and deployment0 LOC (0%) 0 files
other6976 LOC (23%) 16 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
txt
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 132 files match defined criteria (17,714 lines of code, 100.0% vs. main code):
    • 81 *.py files (8,503 lines of code)
    • 13 *.js files (4,845 lines of code)
    • 28 *.html files (3,309 lines of code)
    • 1 *.cpp files (571 lines of code)
    • 7 *.css files (412 lines of code)
    • 1 *.txt files (60 lines of code)
    • 1 *.in files (14 lines of code)
  • " *.py" is biggest, containing 48% of code.
  • " *.in" is smallest, containing 0.08% of code.


*.py8503 LOC (48%) 81 files
*.js4845 LOC (27%) 13 files
*.html3309 LOC (18%) 28 files
*.cpp571 LOC (3%) 1 files
*.css412 LOC (2%) 7 files
*.txt60 LOC (<1%) 1 files
*.in14 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cfg
in
wsgi
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 ".*[-]test[-].*".
    • files with paths like ".*_test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 58 files match defined criteria (5,236 lines of code, 29.6% vs. main code):
    • 46 *.py files (4,742 lines of code)
    • 1 *.pl files (265 lines of code)
    • 5 *.cfg files (106 lines of code)
    • 1 *.in files (61 lines of code)
    • 1 *.sh files (38 lines of code)
    • 4 *.wsgi files (24 lines of code)
  • " *.py" is biggest, containing 90.57% of code.
  • " *.wsgi" is smallest, containing 0.46% of code.


*.py4742 LOC (90%) 46 files
*.pl265 LOC (5%) 1 files
*.cfg106 LOC (2%) 5 files
*.in61 LOC (1%) 1 files
*.sh38 LOC (<1%) 1 files
*.wsgi24 LOC (<1%) 4 files
Other Code
plist
mkdn
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 ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]mkdn".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 16 files match defined criteria (6,976 lines of code, 39.4% vs. main code):
    • 5 *.plist files (6,427 lines of code)
    • 2 *.sql files (274 lines of code)
    • 2 *.md files (112 lines of code)
    • 4 *.json files (102 lines of code)
    • 2 *.py files (48 lines of code)
    • 1 *.mkdn files (13 lines of code)
  • " *.plist" is biggest, containing 92.13% of code.
  • " *.mkdn" is smallest, containing 0.19% of code.


*.plist6427 LOC (92%) 5 files
*.sql274 LOC (3%) 2 files
*.md112 LOC (1%) 2 files
*.json102 LOC (1%) 4 files
*.py48 LOC (<1%) 2 files
*.mkdn13 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.js files are analyzed with JavaScriptAnalyzer:
    • 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
  • *.html files are analyzed with HtmlAnalyzer:
    • 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
  • *.css files are analyzed with CssAnalyzer:
    • 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
  • *.txt 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
  • *.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


2022-01-30 14:51