guardian/coding-exercise-project
Code Volume Analysis scope, overview of main, test, generated, deployment, build, and other code. |
Source Code Analysis Scope
Files includes and excluded from analyses
scoping details...
- 31 extensions are included in analyses: md, gitignore, json, js, rb, ts, yml, swift, clj, go, cjs, txt, properties, rs, scala, py, ps1, java, bat, kt, cs, gradle, csproj, php, sbt, xml, ini, babelrc, toml, jsonc, gemspec
- 7 criteria are used to exclude files from analysis:
- exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (1 file).
- exclude files with path like ".*/git[-]commit[-]trailers[.]txt" (Git history trailers) (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) (1 file).
- exclude files with path like ".*/_sokrates/.*" (Sokrates files) (0 files).
- exclude files with path like ".*/_sokrates_landscape/.*" (Sokrates landscape files) (0 files).
- exclude files with path like ".*/sokrates_.*?[.]json" (Sokrates conventions and configurations) (0 files).
- The source code folder contains 1,425 files:
- 86 files are included in analyses.
- 1,339 files are excluded from analyses:
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.
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
scope details...
- The following criteria are used to filter files:
- files with paths like ".*".
- 25 files match defined criteria (177 LOC, 100.0% vs. main code):
- 2 ps1 files (30 LOC)
- 2 swift files (22 LOC)
- 3 rb files (17 LOC)
- 2 php files (16 LOC)
- 1 cs files (14 LOC)
- 1 jsonc files (13 LOC)
- 2 rs files (11 LOC)
- 2 clj files (9 LOC)
- 2 go files (9 LOC)
- 2 js files (9 LOC)
- 1 java files (9 LOC)
- 2 ts files (7 LOC)
- 1 scala files (6 LOC)
- 1 kt files (4 LOC)
- 1 py files (1 LOC)
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
scope details...
- The following criteria are used to filter files:
- files with paths like ".*_test[.].*".
- files with paths like ".*/test[.].*".
- files with paths like ".*/test_.*".
- files with paths like ".*/[Tt]est/.*".
- files with paths like ".*[.][Tt]est[.].*".
- files with paths like ".*[.]test[.].*".
- files with paths like ".*/[Tt]ests/.*".
- 16 files match defined criteria (150 LOC, 84.7% vs. main code):
- 1 gemspec files (25 LOC)
- 1 cs files (17 LOC)
- 1 csproj files (14 LOC)
- 1 rb files (11 LOC)
- 2 ts files (11 LOC)
- 1 go files (10 LOC)
- 1 java files (9 LOC)
- 1 swift files (9 LOC)
- 1 scala files (8 LOC)
- 1 kt files (8 LOC)
- 2 js files (8 LOC)
- 1 py files (7 LOC)
- 1 bat files (7 LOC)
- 1 clj files (6 LOC)
Build and Deployment Code
Source code used to configure or support build and deployment process.
scope details...
- The following criteria are used to filter files:
- files with paths like ".*[.]bat".
- files with paths like ".*[.]git[a-z]+".
- files with paths like ".*/[.]gitignore".
- files with paths like ".*/Cargo[.]toml".
- files with paths like ".*/pom[.]xml".
- files with paths like ".*[.]csproj".
- files with paths like ".*[.]gradle".
- files with paths like ".*/composer[.]json".
- files with paths like ".*[.]sbt".
- files with paths like "(.*/)?[.]yarnrc([.].*)?".
- files with paths like ".*/package[.]json".
- files with paths like "(.*/)?[.]babelrc([.].*)?".
- files with paths like ".*[.]gemspec".
- 21 files match defined criteria (277 LOC, 156.5% vs. main code):
- 10 gitignore files (88 LOC)
- 1 bat files (68 LOC)
- 1 xml files (47 LOC)
- 2 gradle files (39 LOC)
- 1 toml files (12 LOC)
- 3 yaml files (12 LOC)
- 1 csproj files (6 LOC)
- 1 babelrc files (3 LOC)
- 1 sbt files (2 LOC)
Other Code
scope details...
- 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 ".*[.]properties".
- files with paths like ".*[.]ini".
- files with paths like ".*[.]json".
- files with paths like ".*[.]txt".
- 24 files match defined criteria (1,924 LOC, 1087.0% vs. main code):
- 1 ini files (1,613 LOC)
- 16 md files (225 LOC)
- 5 json files (84 LOC)
- 2 properties files (2 LOC)
About This Analysis
learn more about scopes (main, test, generated, build, 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.
learn more about used code analyzers...
- *.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
- *.swift files are analyzed with SwiftAnalyzer:
- 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
- *.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
- *.php 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
- *.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)
- *.jsonc files are analyzed with JsonAnalyzer:
- 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
- *.rs 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
- *.clj files are analyzed with ClojureLangAnalyzer:
- 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
- *.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
- *.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
- *.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)
- *.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
- *.scala files are analyzed with ScalaAnalyzer:
- 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
- *.kt files are analyzed with KotlinAnalyzer:
- 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 (based on imports and package statements)
- *.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