instagram / IGListKit
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
plist
storyboard
podspec
txt
feature
  • 20 extensions are included in analyses: h, m, swift, html, json, md, plist, mm, xib, sh, js, storyboard, yml, podspec, ts, css, svg, gitignore, txt, feature
  • 4 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/docs/.*" (Documentation) (62 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (9 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).
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.

main12954 LOC (41%) 260 files
test9874 LOC (31%) 109 files
generated0 LOC (0%) 0 files
build and deployment314 LOC (1%) 9 files
other8131 LOC (26%) 174 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 260 files match defined criteria (12,954 lines of code, 100.0% vs. main code):
    • 77 *.m files (7,552 lines of code)
    • 168 *.h files (2,947 lines of code)
    • 8 *.mm files (1,932 lines of code)
    • 2 *.ts files (291 lines of code)
    • 5 *.swift files (232 lines of code)
  • " *.m" is biggest, containing 58.3% of code.
  • " *.swift" is smallest, containing 1.79% of code.


*.m7552 LOC (58%) 77 files
*.h2947 LOC (22%) 168 files
*.mm1932 LOC (14%) 8 files
*.ts291 LOC (2%) 2 files
*.swift232 LOC (1%) 5 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
feature
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*[.]feature".
    • files with paths like ".*__tests__.*".
  • 109 files match defined criteria (9,874 lines of code, 76.2% vs. main code):
    • 63 *.m files (9,088 lines of code)
    • 43 *.h files (345 lines of code)
    • 1 *.ts files (248 lines of code)
    • 1 *.feature files (129 lines of code)
    • 1 *.swift files (64 lines of code)
  • " *.m" is biggest, containing 92.04% of code.
  • " *.swift" is smallest, containing 0.65% of code.


*.m9088 LOC (92%) 63 files
*.h345 LOC (3%) 43 files
*.ts248 LOC (2%) 1 files
*.feature129 LOC (1%) 1 files
*.swift64 LOC (<1%) 1 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
podspec
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]podspec".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
  • 9 files match defined criteria (314 lines of code, 2.4% vs. main code):
    • 6 *.sh files (216 lines of code)
    • 3 *.podspec files (98 lines of code)
  • " *.sh" is biggest, containing 68.79% of code.
  • " *.podspec" is smallest, containing 31.21% of code.


*.sh216 LOC (68%) 6 files
*.podspec98 LOC (31%) 3 files
Other Code
storyboard
plist
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.]xib".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]txt".
  • 174 files match defined criteria (8,131 lines of code, 62.8% vs. main code):
    • 87 *.swift files (3,081 lines of code)
    • 18 *.md files (1,719 lines of code)
    • 25 *.json files (1,078 lines of code)
    • 4 *.storyboard files (1,054 lines of code)
    • 11 *.m files (505 lines of code)
    • 8 *.xib files (396 lines of code)
    • 9 *.plist files (245 lines of code)
    • 12 *.h files (53 lines of code)
  • " *.swift" is biggest, containing 37.89% of code.
  • " *.h" is smallest, containing 0.65% of code.


*.swift3081 LOC (37%) 87 files
*.md1719 LOC (21%) 18 files
*.json1078 LOC (13%) 25 files
*.storyboard1054 LOC (12%) 4 files
*.m505 LOC (6%) 11 files
*.xib396 LOC (4%) 8 files
*.plist245 LOC (3%) 9 files
*.h53 LOC (<1%) 12 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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


2022-04-16 06:55