Code covered by the BSD License  

Highlights from
slocDir

4.0

4.0 | 1 rating Rate this file 15 Downloads (last 30 days) File Size: 2.44 KB File ID: #23837

slocDir

by David Roberts

 

20 Apr 2009 (Updated 22 Jul 2009)

Counts number source lines of code in a directory tree. (Requires sloc, FIle Exchange ID 3900)

| Watch this File

File Information
Description

This function returns the line count for directory tree. If there are multiple functions in one file, subfunctions are not counted separately, but rather together. This function calls sloc.m to count lines of code on an individual file. Sloc can be obtained from the File Exchange on MATLAB Central.

   The following statistics are calculated for a directory tree
       - sum of lines of code from all mfiles in the directory tree
       - sum of lines of code from all mfiles in parent directory
       - sum of lines of code from all mfiles in subdirectories
       - lines of code in each mfile in directory tree

The output of this function can either be to a text file or the MATLAB command prompt or both.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
sloc

MATLAB release MATLAB 7.6 (R2008a)
Other requirements This function calls SLOC (File ID# 3900) to count lines of code on an individual file. SLOC was obtained from the File Exchange on MATLAB Central, and it was written by Raymond Norris of MathWorks Inc.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
09 Mar 2010 Nicolas GUILLAUME  
Please login to add a comment or rating.
Updates
22 Jul 2009

Note in summary to also download sloc from the file exchange.

Tag Activity for this File
Tag Applied By Date/Time
sloc David Roberts 21 Apr 2009 09:51:01
kloc David Roberts 21 Apr 2009 09:51:01
software metrics David Roberts 21 Apr 2009 09:51:01
software measurement David Roberts 21 Apr 2009 09:51:01
source lines of code David Roberts 21 Apr 2009 09:51:01
lines of code David Roberts 21 Apr 2009 09:51:01
kloc Nicolas GUILLAUME 09 Mar 2010 06:16:42
kloc Chintan 06 Oct 2010 13:47:57
kloc Magnus Billstrom 11 Nov 2011 15:56:30
lines of code Magnus Billstrom 11 Nov 2011 15:56:37

Contact us at files@mathworks.com