apple / turicreate
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
ipp
cxx
pod
vcxproj
proto
filters
xsd
in
S
m4
com
cmake
cfg
xsl
pro
mak
inl
Rd
ec
pyx
pxd
adb
pat
s
patch
props
plist
ss
pri
ads
xproj
resx
po
st
el
cmakein
dsp
mms
sas
rdf
csproj
adoc
cmd
Rmd
re
awk
spec
clang-tidy
ini
cl
rda
ASN1
mk
04
storyboard
TXT
ui
wat
vbs
gitmodules
vim
sco
nuspec
podspec
e
cp
t
y
gitattributes
bib
sass
qml
f90
ps
sublime-project
org
xs
yy
clang-format
dcl
flex
  • 131 extensions are included in analyses: hpp, cpp, h, c, py, xml, txt, cc, ipp, html, cxx, pod, vcxproj, proto, md, pl, java, filters, d, json, sh, cs, xsd, rst, in, js, m, S, m4, com, bat, cmake, cfg, php, xsl, css, mm, pro, R, scss, svg, mak, gitignore, htm, inc, asm, cu, inl, Rd, rb, ec, pyx, pxd, adb, yml, swift, pat, s, patch, pas, pm, props, plist, ss, pri, ads, xproj, resx, po, st, el, go, cmakein, dsp, mms, sas, rdf, csproj, adoc, cmd, Rmd, re, awk, spec, clang-tidy, ini, cl, rda, ASN1, mk, 04, storyboard, TXT, ui, wat, xhtml, vbs, xib, gitmodules, vim, sco, nuspec, podspec, e, cp, r, t, y, gemspec, gitattributes, mustache, bib, hh, sass, erb, toml, MD, sql, qml, f90, ps, markdown, sublime-project, yaml, org, xs, bzl, yy, clang-format, dcl, flex
  • 20 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (54 files).
    • exclude files with path like ".*/deps/.*" (Dependencies) (6666 files).
    • exclude files with path like ".*[.]m4" (stuff autogenerated by autoconf - still C deps) (13 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (66 files).
    • exclude files with path like ".*/extern(al)?/.*" (Dependencies) (34759 files).
    • exclude files with path like ".*[.]resx" (The resx resource files) (0 files).
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (0 files).
    • exclude files with path like ".*/testdata/.*" (Test data) (0 files).
    • exclude files with path like ".*/docs?/_?(build|themes?|templates?|static)/.*" (Sphinx) (0 files).
    • exclude files with path like ".*/shBrush([^.]*)\.js" (SyntaxHighlighter - http://alexgorbatchev.com/) (0 files).
    • exclude files with path like ".*/vignettes/.*" (R packages) (0 files).
    • exclude files with path like ".*/bootstrap[.](js|css|less|scss|styl)" (Bootstrap) (2 files).
    • exclude files with path like "(?i).*/jquery.*[.]js" (jQuery files) (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) (0 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (134 files).
    • exclude files with path like ".*[.][0-9]+" (Binary files (e.g. multipart archives)) (2 files).
    • exclude files with path like ".*/bootstrap[-].*" (Library) (1 file).
    • exclude files with path like ".*/static/js/.*" (JS library) (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.

main214239 LOC (48%) 1637 files
test116847 LOC (26%) 382 files
generated34338 LOC (7%) 13 files
build and deployment1153 LOC (<1%) 15 files
other74117 LOC (16%) 204 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
pyx
cmake
pxd
proto
in
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1637 files match defined criteria (214,239 lines of code, 100.0% vs. main code):
    • 436 *.cpp files (85,152 lines of code)
    • 687 *.hpp files (63,962 lines of code)
    • 204 *.py files (28,827 lines of code)
    • 13 *.css files (8,282 lines of code)
    • 37 *.mm files (7,255 lines of code)
    • 63 *.h files (5,436 lines of code)
    • 16 *.pyx files (3,790 lines of code)
    • 54 *.js files (3,642 lines of code)
    • 30 *.m files (3,130 lines of code)
    • 14 *.cmake files (1,228 lines of code)
    • 36 *.scss files (1,175 lines of code)
    • 15 *.pxd files (880 lines of code)
    • 10 *.swift files (636 lines of code)
    • 10 *.html files (522 lines of code)
    • 6 *.proto files (140 lines of code)
    • 2 *.c files (127 lines of code)
    • 1 *.toml files (26 lines of code)
    • 1 *.hh files (19 lines of code)
    • 1 *.in files (8 lines of code)
    • 1 *.cfg files (2 lines of code)
  • " *.cpp" is biggest, containing 39.75% of code.
  • " *.cfg" is smallest, containing 0% of code.


*.cpp85152 LOC (39%) 436 files
*.hpp63962 LOC (29%) 687 files
*.py28827 LOC (13%) 204 files
*.css8282 LOC (3%) 13 files
*.mm7255 LOC (3%) 37 files
*.h5436 LOC (2%) 63 files
*.pyx3790 LOC (1%) 16 files
*.js3642 LOC (1%) 54 files
*.m3130 LOC (1%) 30 files
*.cmake1228 LOC (<1%) 14 files
*.scss1175 LOC (<1%) 36 files
*.pxd880 LOC (<1%) 15 files
*.swift636 LOC (<1%) 10 files
*.html522 LOC (<1%) 10 files
*.proto140 LOC (<1%) 6 files
*.c127 LOC (<1%) 2 files
*.toml26 LOC (<1%) 1 files
*.hh19 LOC (<1%) 1 files
*.in8 LOC (<1%) 1 files
*.cfg2 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cxx
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*_test[.].*".
    • 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/.*".
    • files with paths like ".*/mock[-].*".
  • 382 files match defined criteria (116,847 lines of code, 54.5% vs. main code):
    • 223 *.cxx files (79,375 lines of code)
    • 95 *.py files (31,993 lines of code)
    • 36 *.cpp files (3,298 lines of code)
    • 20 *.hpp files (1,522 lines of code)
    • 4 *.mm files (356 lines of code)
    • 3 *.sh files (269 lines of code)
    • 1 *.js files (34 lines of code)
  • " *.cxx" is biggest, containing 67.93% of code.
  • " *.js" is smallest, containing 0.03% of code.


*.cxx79375 LOC (67%) 223 files
*.py31993 LOC (27%) 95 files
*.cpp3298 LOC (2%) 36 files
*.hpp1522 LOC (1%) 20 files
*.mm356 LOC (<1%) 4 files
*.sh269 LOC (<1%) 3 files
*.js34 LOC (<1%) 1 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 ".*[.]dsp" AND any line of content like ".*[#] Microsoft Developer Studio Generated Build File.*".
    • files with paths like ".*[.](html|html|xhtml)" AND any line of content like "[ ]*[<]meta name[=]"generator" .*".
    • files with paths like ".*/generated/.*".
    • files with paths like ".*[.]cs" AND any line of content like "[/][/][ ]*".
    • files with paths like ".*[.](ps|eps|pfa)".
    • 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 ".*[.]h" AND any line of content like ".* DO NOT EDIT THIS FILE [-] it is machine generated .*".
    • files with paths like ".*/package[-]lock[.]json".
  • 13 files match defined criteria (34,338 lines of code, 16.0% vs. main code):
    • 1 *.json files (23,894 lines of code)
    • 6 *.cc files (6,580 lines of code)
    • 6 *.h files (3,864 lines of code)
  • " *.json" is biggest, containing 69.58% of code.
  • " *.h" is smallest, containing 11.25% of code.


*.json23894 LOC (69%) 1 files
*.cc6580 LOC (19%) 6 files
*.h3864 LOC (11%) 6 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 ".*/[.]gitattributes".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]mk".
    • files with paths like ".*[.]mak".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*[.]podspec".
    • files with paths like ".*[.]nuspec".
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/package[-]lock[.]json".
  • 15 files match defined criteria (1,153 lines of code, 0.5% vs. main code). All matches are in *.sh files.


*.sh1153 LOC (100%) 15 files
Other Code
plist
ini
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]patch".
    • files with paths like ".*/INSTALL[.][a-z0-9]+".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]dsp".
    • files with paths like ".*[.]markdown".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*[.]sublime-project".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]vim".
    • files with paths like ".*[.]xib".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[Mm]an/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 204 files match defined criteria (74,117 lines of code, 34.6% vs. main code):
    • 57 *.json files (63,097 lines of code)
    • 88 *.md files (9,191 lines of code)
    • 23 *.svg files (1,013 lines of code)
    • 33 *.rst files (746 lines of code)
    • 2 *.plist files (60 lines of code)
    • 1 *.ini files (10 lines of code)
  • " *.json" is biggest, containing 85.13% of code.
  • " *.ini" is smallest, containing 0.01% of code.


*.json63097 LOC (85%) 57 files
*.md9191 LOC (12%) 88 files
*.svg1013 LOC (1%) 23 files
*.rst746 LOC (1%) 33 files
*.plist60 LOC (<1%) 2 files
*.ini10 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.cpp 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
  • *.hpp 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
  • *.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
  • *.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
  • *.mm 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
  • *.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
  • *.pyx 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
  • *.m 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
  • *.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
  • *.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
  • *.pxd 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
  • *.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
  • *.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
  • *.proto 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
  • *.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
  • *.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
  • *.hh 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
  • *.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
  • *.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-30 21:43