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.
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
The following criteria are used to filter files:
files with paths like ".*".
2686 files match defined criteria (616,007 lines of code, 100.0% vs. main code):
2,221 *.ts files (459,862 lines of code)
248 *.json files (137,164 lines of code)
168 *.css files (12,030 lines of code)
37 *.js files (6,586 lines of code)
12 *.html files (365 lines of code)
" *.ts" is biggest, containing 74.65% of code.
" *.html" is smallest, containing 0.06% of code.
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
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 ".*[-]tests/.*".
files with paths like ".*[-]test[-].*".
930 files match defined criteria (359,904 lines of code, 58.4% vs. main code):
113 *.json files (179,901 lines of code)
603 *.ts files (139,135 lines of code)
56 *.js files (24,205 lines of code)
59 *.txt files (10,469 lines of code)
28 *.html files (4,618 lines of code)
16 *.css files (304 lines of code)
4 *.scss files (264 lines of code)
8 *.md files (195 lines of code)
1 *.groovy files (106 lines of code)
2 *.py files (77 lines of code)
6 *.cpp files (57 lines of code)
2 *.pl files (55 lines of code)
4 *.less files (51 lines of code)
3 *.php files (43 lines of code)
1 *.clj files (38 lines of code)
1 *.mm files (33 lines of code)
1 *.m files (33 lines of code)
4 *.yaml files (32 lines of code)
2 *.sh files (28 lines of code)
1 *.c files (27 lines of code)
2 *.xml files (26 lines of code)
1 *.rb files (26 lines of code)
1 *.jsx files (24 lines of code)
1 *.java files (23 lines of code)
2 *.go files (21 lines of code)
1 *.cc files (18 lines of code)
1 *.vb files (16 lines of code)
1 *.cs files (16 lines of code)
1 *.shader files (15 lines of code)
1 *.bat files (15 lines of code)
1 *.fs files (14 lines of code)
1 *.swift files (13 lines of code)
1 *.sql files (6 lines of code)
" *.json" is biggest, containing 49.99% of code.
" *.sql" is smallest, containing 0% of code.
Generated Code
Automatically generated files, not manually changed after generation.
The following criteria are used to filter files:
files with any line of content like "[ ]*//.*THIS IS (A )?GENERATED FILE.*".
2 files match defined criteria (6,480 lines of code, 1.1% vs. main code). All matches are in *.ts files.
Build and Deployment Code
Source code used to configure or support build and deployment process.
The following criteria are used to filter files:
files with paths like ".*/(cgmanifest|cglicenses|tslint|gulp[a-z]*|product|tsfmt)[.](json|js|yml|yaml)".
files with paths like ".*/package[.]json".
files with paths like ".*[.]sh".
files with paths like ".*([.]|/)webpack([.]|/).*".
files with paths like ".*[.]bat".
files with paths like ".*/azure[-]pipelines[.][a-z]+".
files with paths like ".*/build/.*".
files with paths like ".*/scripts/code[-]web[.]js".
402 files match defined criteria (32,298 lines of code, 5.2% vs. main code):
170 *.json files (12,942 lines of code)
119 *.js files (10,221 lines of code)
49 *.ts files (6,695 lines of code)
18 *.yml files (1,607 lines of code)
33 *.sh files (521 lines of code)
8 *.bat files (186 lines of code)
2 *.txt files (68 lines of code)
1 *.html files (36 lines of code)
2 *.md files (22 lines of code)
" *.json" is biggest, containing 40.07% of code.
" *.md" is smallest, containing 0.07% of code.
Other Code
The following criteria are used to filter files:
files with paths like ".*/resources/.*".
files with paths like ".*[.]txt".
files with paths like ".*[.]md".
files with paths like ".*[.]svg".
166 files match defined criteria (116,716 lines of code, 18.9% vs. main code):
67 *.txt files (114,821 lines of code)
41 *.md files (834 lines of code)
49 *.svg files (415 lines of code)
1 *.js files (340 lines of code)
3 *.sh files (89 lines of code)
1 *.json files (67 lines of code)
1 *.html files (66 lines of code)
1 *.yaml files (58 lines of code)
2 *.xml files (26 lines of code)
" *.txt" is biggest, containing 98.38% of code.
" *.xml" is smallest, containing 0.02% of code.
Analyzers
Info about analyzers used for source code examinations.
*.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
*.json 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
*.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
*.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)