CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • ohloh LOC stats
Pages: [1]

Author Topic: ohloh LOC stats  (Read 354 times)

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
ohloh LOC stats
January 05, 2014, 07:06:32 am
Just out of curiosity, I am wondering what happened to cause the lines of code to jump by 1.1 million lines from February to March of 2013. Did we start including packages in git that were not in svn?

http://www.ohloh.net/p/civicrm
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: ohloh LOC stats
January 05, 2014, 01:01:05 pm
It's even simpler than that -- we copied our code from svn to git. Double repositories, double LOC.

FWIW, whenever I get curious about LOC, I tend to use Unix find/wc. sloccount would be nice, but it doesn't properly recognize some of our files, and there are some subtotals that I like to see (eg with/without packages). The commands generally look a bit like this: https://gist.github.com/totten/281e8ce7e9041eef74a0

The current output (plus some notes):

Code: [Select]
Core (*.php, non-DAO):
  - Files: 2064
  - Lines:   546078 total
Core (*.php, DAO):
  - Files: 169
  - Lines:   77878 total
Core (*.tpl, *.xml, *.js, *.css):
  - Files: 1678
  - Lines:  188335 total
CMS (*.php, *.inc, *.module, *.install)):
  - Files: 146
  - Lines:   28836 total
Packages (*.php):
  - Files: 1801
  - Lines:   492801 total

Some additional notes not in the script:
 * Most of our core PHP and TPL files include a boilerplate header (~26 lines). This systemically adds extra LOC. For the core PHP, that's ~52 ksloc (~10%).
 * Doesn't include SQL. We have a lot of generated SQL.
 * Doesn't include "tools" or major extensions (like CiviVolunteer / CiviHR)
 * Grand total of code shipped in official tarballs: 1.3 million
« Last Edit: January 05, 2014, 01:03:40 pm by totten »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • ohloh LOC stats

This forum was archived on 2017-11-26.