amazon-connect / amazon-connect-snippets
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
mod
gitattributes
csproj
eslintignore
properties
  • 27 extensions are included in analyses: md, js, json, jsx, py, gitignore, ts, tsx, yml, yaml, txt, html, css, svg, go, gradle, mod, gitattributes, ps1, java, bat, sh, xml, cs, csproj, eslintignore, properties
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (13 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 ".*\.d\.ts" (Typescript definition files) (2 files).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (6 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
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.

main8920 LOC (3%) 77 files
test439 LOC (<1%) 4 files
generated136610 LOC (47%) 3 files
build and deployment114 LOC (<1%) 5 files
other139092 LOC (48%) 47 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 77 files match defined criteria (8,920 lines of code, 100.0% vs. main code):
    • 14 *.jsx files (2,886 lines of code)
    • 14 *.js files (2,183 lines of code)
    • 7 *.yaml files (1,277 lines of code)
    • 11 *.py files (686 lines of code)
    • 5 *.html files (502 lines of code)
    • 7 *.yml files (484 lines of code)
    • 7 *.tsx files (345 lines of code)
    • 3 *.css files (218 lines of code)
    • 4 *.ts files (149 lines of code)
    • 2 *.go files (87 lines of code)
    • 1 *.ps1 files (59 lines of code)
    • 1 *.cs files (23 lines of code)
    • 1 *.java files (21 lines of code)
  • " *.jsx" is biggest, containing 32.35% of code.
  • " *.java" is smallest, containing 0.24% of code.


*.jsx2886 LOC (32%) 14 files
*.js2183 LOC (24%) 14 files
*.yaml1277 LOC (14%) 7 files
*.py686 LOC (7%) 11 files
*.html502 LOC (5%) 5 files
*.yml484 LOC (5%) 7 files
*.tsx345 LOC (3%) 7 files
*.css218 LOC (2%) 3 files
*.ts149 LOC (1%) 4 files
*.go87 LOC (<1%) 2 files
*.ps159 LOC (<1%) 1 files
*.cs23 LOC (<1%) 1 files
*.java21 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 ".*/test_.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 4 files match defined criteria (439 lines of code, 4.9% vs. main code):
    • 3 *.js files (429 lines of code)
    • 1 *.ts files (10 lines of code)
  • " *.js" is biggest, containing 97.72% of code.
  • " *.ts" is smallest, containing 2.28% of code.


*.js429 LOC (97%) 3 files
*.ts10 LOC (2%) 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 ".*/package[-]lock[.]json".
  • 3 files match defined criteria (136,610 lines of code, 1531.5% vs. main code). All matches are in *.json files.


*.json136610 LOC (100%) 3 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 ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]csproj".
  • 5 files match defined criteria (114 lines of code, 1.3% vs. main code):
    • 1 *.bat files (78 lines of code)
    • 2 *.gradle files (17 lines of code)
    • 1 *.sh files (10 lines of code)
    • 1 *.csproj files (9 lines of code)
  • " *.bat" is biggest, containing 68.42% of code.
  • " *.csproj" is smallest, containing 7.89% of code.


*.bat78 LOC (68%) 1 files
*.gradle17 LOC (14%) 2 files
*.sh10 LOC (8%) 1 files
*.csproj9 LOC (7%) 1 files
Other Code
mod
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]eslintignore".
  • 47 files match defined criteria (139,092 lines of code, 1559.3% vs. main code):
    • 13 *.json files (137,652 lines of code)
    • 33 *.md files (1,437 lines of code)
    • 1 *.mod files (3 lines of code)
  • " *.json" is biggest, containing 98.96% of code.
  • " *.mod" is smallest, containing 0% of code.


*.json137652 LOC (98%) 13 files
*.md1437 LOC (1%) 33 files
*.mod3 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.jsx 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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.tsx files are analyzed with TypeScriptAnalyzer:
    • 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
  • *.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
  • *.ts files are analyzed with TypeScriptAnalyzer:
    • 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
  • *.go files are analyzed with GoLangAnalyzer:
    • 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
  • *.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
  • *.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)
  • *.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)


2022-02-01 02:41