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.
files with any line of content like "// Generated using .*".
files with any line of content like "\<\!\-\-[ ]*Generated by .*".
files with any line of content like "//[ ]*Generated by .*".
files with paths like ".*/package[-]lock[.]json".
files with paths like ".*_generated[.][a-z]+".
files with paths like ".*[.](html|html|xhtml)" AND any line of content like "[ ]*[<]meta name[=]"generator" .*".
files with paths like ".*/src/gen/.*".
files with paths like ".*/generated/.*".
files with paths like ".*[.](c|cpp)" AND any line of content like ".*Generated by Cython.*".
files with paths like ".*[.](py|java|h|cc|cpp|m|rb|php)" AND any line of content like ".*Generated by the protocol buffer compiler[.][ ]+DO NOT EDIT[!].*".
files with paths like ".*[.]dsp" AND any line of content like ".*[#] Microsoft Developer Studio Generated Build File.*".
files with paths like ".*[.]cs" AND any line of content like "[/][/][ ]*".
files with any line of content like "// This file was generated .*".
9309 files match defined criteria (1,684,813 LOC, 16.4% vs. main code):
3,945 *.txt files (1,258,554 LOC)
4,121 *.html files (83,420 LOC)
672 *.js files (82,882 LOC)
271 *.h files (74,927 LOC)
38 *.cpp files (70,731 LOC)
24 *.json files (51,386 LOC)
19 *.mjs files (25,882 LOC)
16 *.cc files (25,143 LOC)
17 *.dsp files (5,887 LOC)
21 *.rst files (2,923 LOC)
1 *.inc files (1,434 LOC)
158 *.ini files (1,404 LOC)
1 *.py files (154 LOC)
2 *.cs files (71 LOC)
1 *.rs files (10 LOC)
2 *.md files (5 LOC)
" *.txt" is biggest, containing 74.7% of LOC.
" *.md" is smallest, containing 0% of LOC.
Build and Deployment Code
Source code used to configure or support build and deployment process.