aws-samples / aws-builders-fair-projects
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
xacro
ino
tex
launch
in
cfg
prefs
properties
dae
npmignore
project
dockerignore
editorconfig
csproj
TXT
classpath
  • 41 extensions are included in analyses: json, py, js, ts, css, txt, md, xml, svg, java, html, sh, yaml, cs, rst, gitignore, yml, xacro, ino, scss, vue, graphql, tex, launch, in, cfg, prefs, ipynb, properties, dae, MD, dockerfile, toml, npmignore, project, dockerignore, editorconfig, csproj, sql, TXT, classpath
  • 19 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (104 files).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (8 files).
    • exclude files with path like ".*/target/.*" (Compiled files) (3 files).
    • exclude files with path like "(?i).*/jquery.*[.]js" (jQuery files) (6 files).
    • exclude files with path like ".*[.]min[.]js" (Minimized JS library) (24 files).
    • exclude files with path like ".*jquery[.].*[.]js" (jQuery library) (0 files).
    • exclude files with path like ".*[.]bootstrap[.](js|css|less|scss|styl)" (Bootstrap) (8 files).
    • exclude files with path like ".*/extern(al)?/.*" (Dependencies) (0 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (90 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (302 files).
    • exclude files with path like ".*/bootstrap[.](js|css|less|scss|styl)" (Bootstrap) (2 files).
    • exclude files with path like ".*/react(-[^.]*)?\.js" (React) (10 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 ".*/dist/.*" (Distributions) (4 files).
    • exclude files with path like ".*[.]txt" (Text files) (145 files).
    • exclude files with path like ".*/static/js/.*" (JS library) (2 files).
    • exclude files with path like ".*/bootstrap[-].*" (Library) (1 file).
    • 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.

main285588 LOC (17%) 2500 files
test1196 LOC (<1%) 50 files
generated70445 LOC (4%) 11 files
build and deployment1095 LOC (<1%) 43 files
other1310892 LOC (78%) 2803 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
xacro
ino
txt
tex
launch
in
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 2500 files match defined criteria (285,588 lines of code, 100.0% vs. main code):
    • 1,287 *.py files (200,920 lines of code)
    • 853 *.js files (42,719 lines of code)
    • 111 *.css files (24,281 lines of code)
    • 32 *.html files (2,885 lines of code)
    • 14 *.yml files (2,569 lines of code)
    • 38 *.java files (2,401 lines of code)
    • 30 *.yaml files (2,118 lines of code)
    • 29 *.cs files (1,865 lines of code)
    • 11 *.xacro files (1,765 lines of code)
    • 40 *.ts files (1,146 lines of code)
    • 10 *.ino files (743 lines of code)
    • 7 *.scss files (641 lines of code)
    • 2 *.md files (545 lines of code)
    • 7 *.vue files (382 lines of code)
    • 7 *.graphql files (212 lines of code)
    • 1 *.txt files (169 lines of code)
    • 6 *.tex files (110 lines of code)
    • 6 *.launch files (82 lines of code)
    • 4 *.in files (16 lines of code)
    • 1 *.toml files (11 lines of code)
    • 4 *.cfg files (8 lines of code)
  • " *.py" is biggest, containing 70.35% of code.
  • " *.cfg" is smallest, containing 0% of code.


*.py200920 LOC (70%) 1287 files
*.js42719 LOC (14%) 853 files
*.css24281 LOC (8%) 111 files
*.html2885 LOC (1%) 32 files
*.yml2569 LOC (<1%) 14 files
*.java2401 LOC (<1%) 38 files
*.yaml2118 LOC (<1%) 30 files
*.cs1865 LOC (<1%) 29 files
*.xacro1765 LOC (<1%) 11 files
*.ts1146 LOC (<1%) 40 files
*.ino743 LOC (<1%) 10 files
*.scss641 LOC (<1%) 7 files
*.md545 LOC (<1%) 2 files
*.vue382 LOC (<1%) 7 files
*.graphql212 LOC (<1%) 7 files
*.txt169 LOC (<1%) 1 files
*.tex110 LOC (<1%) 6 files
*.launch82 LOC (<1%) 6 files
*.in16 LOC (<1%) 4 files
*.toml11 LOC (<1%) 1 files
*.cfg8 LOC (<1%) 4 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]est/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*/protractor[.]conf[.]js".
    • files with paths like ".*/karma[.]conf[.]js".
    • files with any line of content like ".*/simpletest/.*".
  • 50 files match defined criteria (1,196 lines of code, 0.4% vs. main code):
    • 31 *.ts files (849 lines of code)
    • 5 *.html files (174 lines of code)
    • 6 *.js files (87 lines of code)
    • 2 *.py files (53 lines of code)
    • 1 *.java files (20 lines of code)
    • 5 *.css files (13 lines of code)
  • " *.ts" is biggest, containing 70.99% of code.
  • " *.css" is smallest, containing 1.09% of code.


*.ts849 LOC (70%) 31 files
*.html174 LOC (14%) 5 files
*.js87 LOC (7%) 6 files
*.py53 LOC (4%) 2 files
*.java20 LOC (1%) 1 files
*.css13 LOC (1%) 5 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".
  • 11 files match defined criteria (70,445 lines of code, 24.7% vs. main code). All matches are in *.json files.


*.json70445 LOC (100%) 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 ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]dockerfile".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*/pom[.]xml".
  • 43 files match defined criteria (1,095 lines of code, 0.4% vs. main code):
    • 31 *.sh files (632 lines of code)
    • 9 *.js files (398 lines of code)
    • 2 *.dockerfile files (43 lines of code)
    • 1 *.csproj files (22 lines of code)
  • " *.sh" is biggest, containing 57.72% of code.
  • " *.csproj" is smallest, containing 2.01% of code.


*.sh632 LOC (57%) 31 files
*.js398 LOC (36%) 9 files
*.dockerfile43 LOC (3%) 2 files
*.csproj22 LOC (2%) 1 files
Other Code
properties
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 ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/INSTALL[.][a-z0-9]+".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/COPYING[.][a-z0-9]+".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 2803 files match defined criteria (1,310,892 lines of code, 459.0% vs. main code):
    • 2,427 *.json files (1,273,289 lines of code)
    • 60 *.svg files (17,944 lines of code)
    • 190 *.py files (7,798 lines of code)
    • 85 *.md files (6,581 lines of code)
    • 25 *.rst files (2,776 lines of code)
    • 11 *.xml files (1,351 lines of code)
    • 2 *.ipynb files (1,107 lines of code)
    • 2 *.properties files (28 lines of code)
    • 1 *.sql files (18 lines of code)
  • " *.json" is biggest, containing 97.13% of code.
  • " *.sql" is smallest, containing 0% of code.


*.json1273289 LOC (97%) 2427 files
*.svg17944 LOC (1%) 60 files
*.py7798 LOC (<1%) 190 files
*.md6581 LOC (<1%) 85 files
*.rst2776 LOC (<1%) 25 files
*.xml1351 LOC (<1%) 11 files
*.ipynb1107 LOC (<1%) 2 files
*.properties28 LOC (<1%) 2 files
*.sql18 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
  • *.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
  • *.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
  • *.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)
  • *.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
  • *.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)
  • *.xacro 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
  • *.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
  • *.ino 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
  • *.scss files are analyzed with ScssAnalyzer:
    • 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
  • *.md 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
  • *.vue 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
  • *.graphql 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
  • *.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
  • *.tex 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
  • *.launch 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
  • *.toml 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
  • *.cfg files are analyzed with CfgAnalyzer:
    • 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


2022-01-31 16:11