awslabs / aws-c-s3
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
npmignore
clang-format
cmake
clang-tidy
  • 15 extensions are included in analyses: c, h, json, sh, txt, md, ts, gitignore, js, yml, npmignore, clang-format, py, cmake, clang-tidy
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (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 ".*/bin/.*" (Binaries for distribution) (2 files).
    • exclude files with path like ".*[.]txt" (Text files) (4 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.

main7008 LOC (46%) 33 files
test6173 LOC (40%) 13 files
generated0 LOC (0%) 0 files
build and deployment280 LOC (1%) 7 files
other1624 LOC (10%) 23 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cmake
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 33 files match defined criteria (7,008 lines of code, 100.0% vs. main code):
    • 12 *.c files (5,574 lines of code)
    • 13 *.h files (980 lines of code)
    • 2 *.ts files (317 lines of code)
    • 1 *.py files (62 lines of code)
    • 3 *.js files (53 lines of code)
    • 1 *.yml files (14 lines of code)
    • 1 *.cmake files (8 lines of code)
  • " *.c" is biggest, containing 79.54% of code.
  • " *.cmake" is smallest, containing 0.11% of code.


*.c5574 LOC (79%) 12 files
*.h980 LOC (13%) 13 files
*.ts317 LOC (4%) 2 files
*.py62 LOC (<1%) 1 files
*.js53 LOC (<1%) 3 files
*.yml14 LOC (<1%) 1 files
*.cmake8 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 ".*/[Tt]ests/.*".
    • files with paths like ".*_tests[.].*".
    • 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/.*".
  • 13 files match defined criteria (6,173 lines of code, 88.1% vs. main code):
    • 11 *.c files (5,905 lines of code)
    • 1 *.h files (237 lines of code)
    • 1 *.ts files (31 lines of code)
  • " *.c" is biggest, containing 95.66% of code.
  • " *.ts" is smallest, containing 0.5% of code.


*.c5905 LOC (95%) 11 files
*.h237 LOC (3%) 1 files
*.ts31 LOC (<1%) 1 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
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 ".*/package[.]json".
  • 7 files match defined criteria (280 lines of code, 4.0% vs. main code). All matches are in *.sh files.


*.sh280 LOC (100%) 7 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • 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 ".*/[.]gitignore".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/[.]npmignore".
  • 23 files match defined criteria (1,624 lines of code, 23.2% vs. main code):
    • 4 *.c files (1,171 lines of code)
    • 13 *.json files (287 lines of code)
    • 4 *.md files (125 lines of code)
    • 2 *.h files (41 lines of code)
  • " *.c" is biggest, containing 72.11% of code.
  • " *.h" is smallest, containing 2.52% of code.


*.c1171 LOC (72%) 4 files
*.json287 LOC (17%) 13 files
*.md125 LOC (7%) 4 files
*.h41 LOC (2%) 2 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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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


2022-01-31 19:27