1 History. 1.1 End of 1990s: Foundation of the Open Source Initiative; 2 Definitions. 2.1 Open-source software licensing; 2.2 Certifications; 3 Open-source software. Source code is one of those few action/sci-Fi movies that work effectively without exaggeration or embellishment. When we see Source Code we see the certain. MTV2's Guy Code is the ultimate guy's guide to the laws of manhood. Every bro knows the code. Some say guys are born with it, but not everyone follows the same set of. CLOC - - Count Lines of Code. Translations. Serbo- Croatian. Slovakian. Ukrainian. Given two versions of a code base, cloc can compute. It is written entirely in Perl with no dependencies outside the. Perl v. 5. 6 and higher. Linux, Free. BSD. Net. BSD, Open. BSD. Mac OS X, AIX, HP- UX, Solaris, IRIX, z/OS, and Windows. To run the Perl source version of cloc on Windows one needs.
Active. State Perl. Strawberry Perl. the Perl plug- in installed. Alternatively one can use the. Windows binary of cloc generated with. Windows computers that have neither Perl nor Cygwin.). David Wheeler's. Damian Conway and Abigail's Perl module. Regexp: :Common. Sean M. Burke's Perl module. Win. 32: :Autoglob, and Tye Mc. Queen's Perl module. Algorithm: :Diff. Language scale factors were derived from Mayes Consulting, LLC web site http: //softwareestimator. Industry. Data. 2. Depending your operating system, one of these. Debian, Ubuntu. sudo yum install cloc # Red Hat, Fedora. S cloc # Arch. Free. BSD. sudo port install cloc # Mac OS X with Mac. Ports. The source code, release notes, Windows executable, and Unix package. Source code for the latest Subversion commit can be found at. HEAD/tree/trunk/cloc. GNU General Public License, v. Code copied from the. Regexp: :Common, Win. Autoglob, and Algorithm: :Diff Perl. Artistic License. Exists as a single, self- contained file that requires minimal. Can read language comment definitions from a file and thus. Allows results from multiple runs to be summed together. Can produce results in a variety of formats. SQL, XML, YAML, comma separated values. Can count code within compressed archives (tar balls, Zip files. Java . ear files). Has numerous troubleshooting options. Handles file and directory names with spaces and other unusual. Has no dependencies outside the standard Perl distribution. Runs on Linux, Free. BSD, Net. BSD, Open. BSD, Mac OS X, AIX. HP- UX, Solaris, IRIX. OS systems that have Perl 5. The source version runs on Windows with either Active. State. Perl, Strawberry Perl, Cygwin, or Moba. XTerm+Perl plugin. Alternatively on Windows one can run. Windows binary which has no dependencies. If cloc does not suit your needs here are other freely available. Other references. Although cloc does not need Perl modules outside those found in the. Code from three of these external modules- -Regexp: :Common. Win. 32: :Autoglob, and Algorithm: :Diff- -is embedded within cloc. A fourth module. Digest: :MD5, is used only if it is available. If cloc finds Regexp: :Common. Algorithm: :Diff. If it doesn't, cloc will install the parts. Regexp: :Common. and/or Algorithm: Diff. The necessary code from Regexp: :Common v. Algorithm: :Diff v. Install_Regexp_Common() and. Install_Algorithm_Diff() ). Only three lines are needed from Win. Autoglob and these are. Additionally, cloc will use Digest: :MD5 to validate uniqueness among. Digest: :MD5 is installed locally. If Digest: :MD5 is. The Windows binary is built on a computer that has both Regexp: :Common. Digest: :MD5 installed locally. The default Windows download, cloc- 1. PAR: :Packer on a Windows 7 computer with. Strawberry Perl. Windows executables of cloc versions 1. Windows XP computer. A small modification was made. Uncomment next two lines when building Windows executable with perl. Regexp: :Common. 8. Regexp: :Common. 8. HAVE_Rexexp_Common = 1; Why is the Windows executable so large? Windows executables of cloc versions 1. MB, while newer versions, created with PAR: :Packer. Why are the newer executables so much larger? My theory is that perl. PAR: :Packer, but that's pure speculation. Create your own executable. If you have access to perl. Windows executable. See lines 8. 4- 8. Windows executable with pp from PAR: :Packer. Windows- based Perl distribution (for example. Strawberry Perl or Active. Perl) following their instructions. DOS window and install the. PAR: :Packer module. Finally, invoke the newly installed pp command with the. C: > perl - MCPAN - e shell. PAR: :Packer. C: > pp cloc- 1. A variation on the above is if you installed the portable version. Strawberry Perl, you will need to run portableshell. The Strawberry Perl. Source. Forge download area was created. Windows 7 computer. Here's an example of running cloc against. Perl v. 5. 1. 0. 0 source distribution. T=1. 2. 0 s (2. 09. Language files blank comment code. Perl 2. C 1. C/C++ Header 1. Bourne Shell 1. Lisp 1 6. C++ 1. XML 2. YAML 2 2 0 4. DOS Batch 1. HTML 1 1. SUM: 2. To run cloc on Windows computers, one must first open up a command. DOS) window and invoke cloc. Usage: cloc [options] < file(s)/dir(s)> | < set 1> < set 2> | < report files>. Count, or compute differences of, physical lines of source code in the. This option is only needed if cloc is unable. Use < cmd> to extract binary archive files (e. Z). Use the literal '> FILE< ' as. For example, to count lines of code. Unix use. - -extract- with='gzip - dc > FILE< | tar xf - '. GNU tar. - -extract- with='tar zxf > FILE< '. Windows use, for example. Program Files\Win. Zip\Win. Zip. 32. FILE< .". (if Win. Zip is installed there). Take the list of file and/or directory names to. Only exact matches are counted. See also - -exclude- list- file. Check binary files to see if they contain Unicode. ASCII text. This causes performance to. Processing Options. Count . in files (as processed by GNU autoconf) of. Report results for every source file encountered. Report results for every source file encountered. First perform direct code counts of source file(s). Inputs may be pairs of files, directories. See also - -diff, - -diff- alignment. Compute differences in code and comments between. The inputs. may be pairs of files, directories, or archives. Use - -diff- alignment to generate a list showing. See also. - -count- and- diff, - -diff- alignment, - -diff- timeout. N> Ignore files which take more than < N> seconds. Default is 1. 0 seconds. Large files with many repeated lines can cause. Algorithm: :Diff: :sdiff() to take hours.). Unix only] Follow symbolic links to directories. Process all files that have a < ext> extension. For. example, to count all . Fortran 9. 0 counter (which expects files to. Fortran 7. 7. counter, use. Fortran 9. 0",f. If < ext> is omitted, every file will be counted. This option can be. See also - -script- lang, - -lang- no- ext. Load language processing filters from < file>. Note: languages which map to the same. MATLAB/Objective C/MUMPS/Mercury; Pascal/PHP. Lisp/Open. CL; Lisp/Julia; Perl/Prolog) will be. Use - -read- lang- def to define new. Ignore horizontal white space when comparing files. See also - -ignore- case. Ignore changes in case; consider upper- and lower- . See also - -ignore- whitespace. Count files without extensions using the < lang>. This option overrides internal logic. See also. - -force- lang, - -script- lang. MB> Skip files larger than < MB> megabytes when. By default, < MB> =1. MB on a computer with less. GB of memory will cause problems. Note: this check does not apply to files. Process binary files in addition to text files. This is usually a bad idea and should only be. Load new language processing filters from < file>. If < file> defines a language cloc already knows. Use - -force- lang- def to over- ride cloc's. Process all files that invoke < s> as a #! For example, files that begin with. Perl counter by using. Perl,perl. 5. 8. 8. The language name is case insensitive but the. This option can be. See also - -force- lang. Use < dir> as the scratch directory instead of. File: :Temp chose the location. Files. written to this location are not removed at. File: :Temp). - -skip- uniqueness Skip the file uniqueness check. This will give. a performance boost at the expense of counting. Give a file name to use to determine the language. For each file processed, write to the current. The name of each. It is written to the. Only effective in combination with. Write the stripped files. Input arguments are report files previously. Makes. a cumulative set of results containing the. Override the operating system autodetection. UNIX mode. See also. Override the operating system autodetection. Microsoft Windows mode. See also - -unix, - -show- os. Filter Options. - -exclude- dir=< D1> [,D2,] Exclude the given comma separated directories. D1, D2, D3, et cetera, from being scanned. For. example - -exclude- dir=. Directories named . Do not count files having the given file name. L1> [,L2,] Exclude the given comma separated languages. L1, L2, L3, et cetera, from being counted. Ignore files and/or directories whose names. Only exact matches are ignored. See also - -list- file. L1> [,L2,] Count only the given comma separated languages. L1, L2, L3, et cetera. Only count files in directories matching the Perl. For example. - -match- d='/(src|include)/'. Count all files except those in directories. Perl regex. - -match- f=< regex> Only count files whose basenames match the Perl. For example. - -match- f='^[Ww]idget'. Widget or widget. Count all files except those whose basenames. Perl regex. - -skip- archive=< regex> Ignore files that end with the given Perl regular. For example, if given. Z|bz. 2|xz|7z))?)'. Z, . tar. bz. 2, . On Windows, ignore hidden files. Save names of categorized files to < file>. Save names of processed source files to < file>. Print the filters used to remove comments for. In some cases the. Perl subroutines rather than. An examination of the. Write to < file> a list of files and file pairs. This switch. forces the - -diff mode on. Print this usage information and exit. Save names of every file found to < file>. Save names of ignored files and the reason they. Print processed source code before and after. Print information about all known (or just the. Print information about all known (or just the.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2016
Categories |