objective-ci 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +17 -0
- data/BSD-LICENSE.txt +31 -0
- data/GPL-LICENSE.txt +16 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +92 -0
- data/Rakefile +24 -0
- data/bin/ada_count +4 -0
- data/bin/asm_count +4 -0
- data/bin/awk_count +4 -0
- data/bin/break_filelist +4 -0
- data/bin/c_count +4 -0
- data/bin/cobol_count +4 -0
- data/bin/compute_all +4 -0
- data/bin/compute_sloc_lang +4 -0
- data/bin/count_extensions +4 -0
- data/bin/count_unknown_ext +4 -0
- data/bin/csh_count +4 -0
- data/bin/exp_count +4 -0
- data/bin/f90_count +4 -0
- data/bin/fortran_count +4 -0
- data/bin/generic_count +4 -0
- data/bin/get_sloc +4 -0
- data/bin/get_sloc_details +4 -0
- data/bin/haskell_count +4 -0
- data/bin/java_count +4 -0
- data/bin/jsp_count +4 -0
- data/bin/lex_count +4 -0
- data/bin/lexcount1 +4 -0
- data/bin/lisp_count +4 -0
- data/bin/make_filelists +4 -0
- data/bin/makefile_count +4 -0
- data/bin/ml_count +4 -0
- data/bin/modula3_count +4 -0
- data/bin/objc_count +4 -0
- data/bin/oclint-0.8 +4 -0
- data/bin/oclint-json-compilation-database +4 -0
- data/bin/oclint-xcodebuild +4 -0
- data/bin/pascal_count +4 -0
- data/bin/perl_count +4 -0
- data/bin/php_count +4 -0
- data/bin/pmd-cpd-objc +7 -0
- data/bin/print_sum +4 -0
- data/bin/python_count +4 -0
- data/bin/ruby_count +4 -0
- data/bin/sed_count +4 -0
- data/bin/sh_count +4 -0
- data/bin/show_filecount +4 -0
- data/bin/sloccount +4 -0
- data/bin/sql_count +4 -0
- data/bin/tcl_count +4 -0
- data/docs/jenkins-setup-violations.png +0 -0
- data/docs/jenkins-setup.jpg +0 -0
- data/externals/oclint/oclint-0.8 +0 -0
- data/externals/oclint/oclint-json-compilation-database +86 -0
- data/externals/oclint/oclint-xcodebuild +216 -0
- data/externals/pmd-cpd/ObjCLanguage-0.0.7-SNAPSHOT.jar +0 -0
- data/externals/pmd-cpd/pmd-4.2.5.jar +0 -0
- data/externals/sloccount/ada_count +27 -0
- data/externals/sloccount/asm_count +166 -0
- data/externals/sloccount/awk_count +27 -0
- data/externals/sloccount/break_filelist +1308 -0
- data/externals/sloccount/c_count +0 -0
- data/externals/sloccount/cobol_count +82 -0
- data/externals/sloccount/compute_all +87 -0
- data/externals/sloccount/compute_sloc_lang +66 -0
- data/externals/sloccount/count_extensions +56 -0
- data/externals/sloccount/count_unknown_ext +32 -0
- data/externals/sloccount/csh_count +27 -0
- data/externals/sloccount/exp_count +27 -0
- data/externals/sloccount/f90_count +81 -0
- data/externals/sloccount/fortran_count +83 -0
- data/externals/sloccount/generic_count +77 -0
- data/externals/sloccount/get_sloc +544 -0
- data/externals/sloccount/get_sloc_details +103 -0
- data/externals/sloccount/haskell_count +122 -0
- data/externals/sloccount/java_count +0 -0
- data/externals/sloccount/jsp_count +0 -0
- data/externals/sloccount/lex_count +70 -0
- data/externals/sloccount/lexcount1 +0 -0
- data/externals/sloccount/lisp_count +27 -0
- data/externals/sloccount/make_filelists +193 -0
- data/externals/sloccount/makefile_count +27 -0
- data/externals/sloccount/ml_count +0 -0
- data/externals/sloccount/modula3_count +65 -0
- data/externals/sloccount/objc_count +89 -0
- data/externals/sloccount/pascal_count +0 -0
- data/externals/sloccount/perl_count +147 -0
- data/externals/sloccount/php_count +0 -0
- data/externals/sloccount/print_sum +40 -0
- data/externals/sloccount/python_count +120 -0
- data/externals/sloccount/ruby_count +27 -0
- data/externals/sloccount/sed_count +27 -0
- data/externals/sloccount/sh_count +27 -0
- data/externals/sloccount/show_filecount +58 -0
- data/externals/sloccount/sloccount +258 -0
- data/externals/sloccount/sql_count +76 -0
- data/externals/sloccount/tcl_count +27 -0
- data/lib/objective-ci.rb +3 -0
- data/lib/objective_ci/ci_tasks.rb +142 -0
- data/lib/objective_ci/version.rb +3 -0
- data/objective-ci.gemspec +26 -0
- metadata +255 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
#!/usr/bin/perl
|
|
2
|
+
# perl_count - count physical lines of code in Perl programs.
|
|
3
|
+
# Usage: perl_count [-f file] [list_of_files]
|
|
4
|
+
# file: file with a list of files to count (if "-", read list from stdin)
|
|
5
|
+
# list_of_files: list of files to count
|
|
6
|
+
# -f file or list_of_files can be used, or both
|
|
7
|
+
|
|
8
|
+
# Physical lines of Perl are MUCH HARDER to count than you'd think.
|
|
9
|
+
# Comments begin with "#".
|
|
10
|
+
# Also, anything in a "perlpod" is a comment.
|
|
11
|
+
# See perlpod(1) for more info; a perlpod starts with
|
|
12
|
+
# \s*=command, can have more commands, and ends with \s*=cut.
|
|
13
|
+
# Note that = followed by space is NOT a perlpod.
|
|
14
|
+
# Although we ignore everything after __END__ in a file,
|
|
15
|
+
# we will count everything after __DATA__; there's arguments for counting
|
|
16
|
+
# and for not counting __DATA__.
|
|
17
|
+
|
|
18
|
+
# What's worse, "here" documents must be COUNTED AS CODE, even if
|
|
19
|
+
# they're FORMATTED AS A PERLPOD. Surely no one would do this, right?
|
|
20
|
+
# Sigh... it can happen. See perl5.005_03/pod/splitpod.
|
|
21
|
+
|
|
22
|
+
# This is part of SLOCCount, a toolsuite that counts
|
|
23
|
+
# source lines of code (SLOC).
|
|
24
|
+
# Copyright (C) 2001-2004 David A. Wheeler.
|
|
25
|
+
#
|
|
26
|
+
# This program is free software; you can redistribute it and/or modify
|
|
27
|
+
# it under the terms of the GNU General Public License as published by
|
|
28
|
+
# the Free Software Foundation; either version 2 of the License, or
|
|
29
|
+
# (at your option) any later version.
|
|
30
|
+
#
|
|
31
|
+
# This program is distributed in the hope that it will be useful,
|
|
32
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
33
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
34
|
+
# GNU General Public License for more details.
|
|
35
|
+
#
|
|
36
|
+
# You should have received a copy of the GNU General Public License
|
|
37
|
+
# along with this program; if not, write to the Free Software
|
|
38
|
+
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
39
|
+
#
|
|
40
|
+
# To contact David A. Wheeler, see his website at:
|
|
41
|
+
# http://www.dwheeler.com.
|
|
42
|
+
#
|
|
43
|
+
#
|
|
44
|
+
|
|
45
|
+
$total_sloc = 0;
|
|
46
|
+
|
|
47
|
+
# Do we have "-f" (read list of files from second argument)?
|
|
48
|
+
if (($#ARGV >= 1) && ($ARGV[0] eq "-f")) {
|
|
49
|
+
# Yes, we have -f
|
|
50
|
+
if ($ARGV[1] eq "-") {
|
|
51
|
+
# The list of files is in STDIN
|
|
52
|
+
while (<STDIN>) {
|
|
53
|
+
chomp ($_);
|
|
54
|
+
&count_file ($_);
|
|
55
|
+
}
|
|
56
|
+
} else {
|
|
57
|
+
# The list of files is in the file $ARGV[1]
|
|
58
|
+
open (FILEWITHLIST, $ARGV[1]) || die "Error: Could not open $ARGV[1]\n";
|
|
59
|
+
while (<FILEWITHLIST>) {
|
|
60
|
+
chomp ($_);
|
|
61
|
+
&count_file ($_);
|
|
62
|
+
}
|
|
63
|
+
close FILEWITHLIST;
|
|
64
|
+
}
|
|
65
|
+
shift @ARGV; shift @ARGV;
|
|
66
|
+
}
|
|
67
|
+
# Process all (remaining) arguments as file names
|
|
68
|
+
while ($file = shift @ARGV) {
|
|
69
|
+
&count_file ($file);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
print "Total:\n";
|
|
73
|
+
print "$total_sloc\n";
|
|
74
|
+
|
|
75
|
+
sub count_file {
|
|
76
|
+
my ($file) = @_;
|
|
77
|
+
my $sloc = 0;
|
|
78
|
+
my $isinpod = 0;
|
|
79
|
+
my $heredocument = ""; # If nonempty, identifies the ending marker.
|
|
80
|
+
|
|
81
|
+
open (FILE, $file);
|
|
82
|
+
while (<FILE>) {
|
|
83
|
+
s/#.*//; # Delete leading comments.
|
|
84
|
+
if ($heredocument and m/^\s*$heredocument/) {
|
|
85
|
+
$heredocument = ""; # finished here doc.
|
|
86
|
+
} elsif (m/<<\s*["']?([A-Za-z0-9_-]+)["']?[;,]\s*$/) {
|
|
87
|
+
# Beginning of a here document.
|
|
88
|
+
$heredocument = $1;
|
|
89
|
+
} elsif (!$heredocument && m/^\s*=cut/) { # Ending a POD?
|
|
90
|
+
if (! $isinpod) {
|
|
91
|
+
print stderr "cut without pod start in file $file line $.\n";
|
|
92
|
+
}
|
|
93
|
+
s/.*//; # Don't count the cut command.
|
|
94
|
+
$isinpod = 0;
|
|
95
|
+
} elsif (!$heredocument && m/^\s*=[a-zA-Z]/) { # Starting continuing a POD?
|
|
96
|
+
# Perlpods can have multiple contents, so it's okay if $isinpod == 1.
|
|
97
|
+
# Note that =(space) isn't a POD; library file perl5db.pl does this!
|
|
98
|
+
$isinpod = 1;
|
|
99
|
+
} elsif (m/^__END__/) { # Stop processing this file on __END__.
|
|
100
|
+
last;
|
|
101
|
+
}
|
|
102
|
+
if ((! $isinpod) && (m/\S/)) { $sloc++;}
|
|
103
|
+
}
|
|
104
|
+
# Show per-file & total; reset $isinpod per file.
|
|
105
|
+
print "$sloc $file\n";
|
|
106
|
+
$total_sloc += $sloc;
|
|
107
|
+
$sloc = 0;
|
|
108
|
+
if ($isinpod) {
|
|
109
|
+
print stderr "pod without closing cut in file $file\n";
|
|
110
|
+
}
|
|
111
|
+
# Reset state:
|
|
112
|
+
$isinpod = 0;
|
|
113
|
+
$heredocument = "";
|
|
114
|
+
close (FILE);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
# The following is POD documentation; it should not be counted:
|
|
118
|
+
=head1 Test
|
|
119
|
+
=head2 testing
|
|
120
|
+
=cut
|
|
121
|
+
|
|
122
|
+
__END__
|
|
123
|
+
# The following should not be counted in a line-counting program:
|
|
124
|
+
print "Hello!\n";
|
|
125
|
+
print "Hello!\n";
|
|
126
|
+
print "Hello!\n";
|
|
127
|
+
print "Hello!\n";
|
|
128
|
+
print "Hello!\n";
|
|
129
|
+
print "Hello!\n";
|
|
130
|
+
print "Hello!\n";
|
|
131
|
+
print "Hello!\n";
|
|
132
|
+
print "Hello!\n";
|
|
133
|
+
print "Hello!\n";
|
|
134
|
+
print "Hello!\n";
|
|
135
|
+
print "Hello!\n";
|
|
136
|
+
print "Hello!\n";
|
|
137
|
+
print "Hello!\n";
|
|
138
|
+
print "Hello!\n";
|
|
139
|
+
print "Hello!\n";
|
|
140
|
+
print "Hello!\n";
|
|
141
|
+
print "Hello!\n";
|
|
142
|
+
print "Hello!\n";
|
|
143
|
+
print "Hello!\n";
|
|
144
|
+
print "Hello!\n";
|
|
145
|
+
print "Hello!\n";
|
|
146
|
+
|
|
147
|
+
|
|
Binary file
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/usr/bin/perl
|
|
2
|
+
# print_sum - read from stdin and print the sum.
|
|
3
|
+
|
|
4
|
+
# This is part of SLOCCount, a toolsuite that counts
|
|
5
|
+
# source lines of code (SLOC).
|
|
6
|
+
# Copyright (C) 2001-2004 David A. Wheeler.
|
|
7
|
+
#
|
|
8
|
+
# This program is free software; you can redistribute it and/or modify
|
|
9
|
+
# it under the terms of the GNU General Public License as published by
|
|
10
|
+
# the Free Software Foundation; either version 2 of the License, or
|
|
11
|
+
# (at your option) any later version.
|
|
12
|
+
#
|
|
13
|
+
# This program is distributed in the hope that it will be useful,
|
|
14
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
# GNU General Public License for more details.
|
|
17
|
+
#
|
|
18
|
+
# You should have received a copy of the GNU General Public License
|
|
19
|
+
# along with this program; if not, write to the Free Software
|
|
20
|
+
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
21
|
+
#
|
|
22
|
+
# To contact David A. Wheeler, see his website at:
|
|
23
|
+
# http://www.dwheeler.com.
|
|
24
|
+
#
|
|
25
|
+
#
|
|
26
|
+
|
|
27
|
+
$total = 0.0;
|
|
28
|
+
|
|
29
|
+
while (<>) {
|
|
30
|
+
if (m/^\s*([\d.]+)/) {
|
|
31
|
+
$maybe_number = $1;
|
|
32
|
+
$maybe_number =~ s/\.*$//; # chop trailing ".".
|
|
33
|
+
if ($maybe_number =~ m/\d/) {
|
|
34
|
+
$total += $maybe_number;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
print "$total\n";
|
|
40
|
+
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
#!/usr/bin/perl -w
|
|
2
|
+
# python_count - count physical lines of code in Python programs.
|
|
3
|
+
# Usage: python_count [-f file] [list_of_files]
|
|
4
|
+
# file: file with a list of files to count (if "-", read list from stdin)
|
|
5
|
+
# list_of_files: list of files to count
|
|
6
|
+
# -f file or list_of_files can be used, or both
|
|
7
|
+
# This is a trivial/naive program.
|
|
8
|
+
|
|
9
|
+
# Comments begin with "#".
|
|
10
|
+
# Python supports multi-line strings using """, which matches another """.
|
|
11
|
+
# When not inside a multi-line string, a line whose first non-whitespace
|
|
12
|
+
# is """ almost always indicates a programming comment;
|
|
13
|
+
# this is also true for lines beginning with '"'
|
|
14
|
+
# This means that a string which is part of an expression but which begins
|
|
15
|
+
# a new line won't be counted; this problem is rare in practice.
|
|
16
|
+
# This code DOES count _data_ inside a triple-quote (that's not a comment).
|
|
17
|
+
# Note that this isn't true for single-quote, which is used in case
|
|
18
|
+
# statements (etc.) but not in this context.
|
|
19
|
+
|
|
20
|
+
# This is part of SLOCCount, a toolsuite that counts
|
|
21
|
+
# source lines of code (SLOC).
|
|
22
|
+
# Copyright (C) 2001-2004 David A. Wheeler.
|
|
23
|
+
#
|
|
24
|
+
# This program is free software; you can redistribute it and/or modify
|
|
25
|
+
# it under the terms of the GNU General Public License as published by
|
|
26
|
+
# the Free Software Foundation; either version 2 of the License, or
|
|
27
|
+
# (at your option) any later version.
|
|
28
|
+
#
|
|
29
|
+
# This program is distributed in the hope that it will be useful,
|
|
30
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
31
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
32
|
+
# GNU General Public License for more details.
|
|
33
|
+
#
|
|
34
|
+
# You should have received a copy of the GNU General Public License
|
|
35
|
+
# along with this program; if not, write to the Free Software
|
|
36
|
+
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
37
|
+
#
|
|
38
|
+
# To contact David A. Wheeler, see his website at:
|
|
39
|
+
# http://www.dwheeler.com.
|
|
40
|
+
#
|
|
41
|
+
#
|
|
42
|
+
|
|
43
|
+
$total_sloc = 0;
|
|
44
|
+
|
|
45
|
+
# Do we have "-f" (read list of files from second argument)?
|
|
46
|
+
if (($#ARGV >= 1) && ($ARGV[0] eq "-f")) {
|
|
47
|
+
# Yes, we have -f
|
|
48
|
+
if ($ARGV[1] eq "-") {
|
|
49
|
+
# The list of files is in STDIN
|
|
50
|
+
while (<STDIN>) {
|
|
51
|
+
chomp ($_);
|
|
52
|
+
&count_file ($_);
|
|
53
|
+
}
|
|
54
|
+
} else {
|
|
55
|
+
# The list of files is in the file $ARGV[1]
|
|
56
|
+
open (FILEWITHLIST, $ARGV[1]) || die "Error: Could not open $ARGV[1]\n";
|
|
57
|
+
while (<FILEWITHLIST>) {
|
|
58
|
+
chomp ($_);
|
|
59
|
+
&count_file ($_);
|
|
60
|
+
}
|
|
61
|
+
close FILEWITHLIST;
|
|
62
|
+
}
|
|
63
|
+
shift @ARGV; shift @ARGV;
|
|
64
|
+
}
|
|
65
|
+
# Process all (remaining) arguments as file names
|
|
66
|
+
while ($file = shift @ARGV) {
|
|
67
|
+
&count_file ($file);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
print "Total:\n";
|
|
71
|
+
print "$total_sloc\n";
|
|
72
|
+
|
|
73
|
+
sub count_file {
|
|
74
|
+
my ($file) = @_;
|
|
75
|
+
my $sloc = 0;
|
|
76
|
+
my $isintriple = 0; # A triple-quote is in effect.
|
|
77
|
+
my $isincomment = 0; # We are in a multiline (triple-quoted) comment.
|
|
78
|
+
|
|
79
|
+
open (FILE, $file);
|
|
80
|
+
while (<FILE>) {
|
|
81
|
+
if (! $isintriple) { # Normal case:
|
|
82
|
+
s/""".*"""//; # Delete triple-quotes that begin & end on the line.
|
|
83
|
+
s/^\s*"([^"]|(\\"))+"//; # Delete lonely strings starting on BOL.
|
|
84
|
+
s/#.*//; # Delete "#" comments.
|
|
85
|
+
if (m/"""/) { # Does a multiline triple-quote begin here?
|
|
86
|
+
$isintriple = 1;
|
|
87
|
+
if (m/^\s*"""/) {$isincomment = 1;} # It's a comment if at BOL.
|
|
88
|
+
}
|
|
89
|
+
} else { # we ARE in a triple.
|
|
90
|
+
if (m/"""/) {
|
|
91
|
+
if ($isincomment) {
|
|
92
|
+
s/.*?"""//; # Delete string text if it's a comment (not if data)
|
|
93
|
+
} else {
|
|
94
|
+
s/.*?"""/x/; # Leave something there to count.
|
|
95
|
+
}
|
|
96
|
+
# But wait! Another triple might start on this line!
|
|
97
|
+
# (see Python-1.5.2/Tools/freeze/makefreeze.py for an example)
|
|
98
|
+
if (m/"""/) {
|
|
99
|
+
# It did! No change in state!
|
|
100
|
+
} else {
|
|
101
|
+
$isintriple = 0;
|
|
102
|
+
$isincomment = 0;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
# TO DEBUG:
|
|
107
|
+
# print "cmmnt=${isincomment} trp=${isintriple}: $_\n";
|
|
108
|
+
if ( (!$isincomment) && m/\S/) {$sloc++;};
|
|
109
|
+
}
|
|
110
|
+
print "$sloc $file\n";
|
|
111
|
+
$total_sloc += $sloc;
|
|
112
|
+
$sloc = 0;
|
|
113
|
+
if ($isintriple) {
|
|
114
|
+
print STDERR "No closing triple-doublequote-marks in file $file\n";
|
|
115
|
+
}
|
|
116
|
+
# Reset rest of state:
|
|
117
|
+
$isintriple = 0;
|
|
118
|
+
$isincomment = 0;
|
|
119
|
+
close (FILE); # Reset $. (line count) each time.
|
|
120
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
#
|
|
3
|
+
# This is part of SLOCCount, a toolsuite that counts
|
|
4
|
+
# source lines of code (SLOC).
|
|
5
|
+
# Copyright (C) 2001-2004 David A. Wheeler.
|
|
6
|
+
#
|
|
7
|
+
# This program is free software; you can redistribute it and/or modify
|
|
8
|
+
# it under the terms of the GNU General Public License as published by
|
|
9
|
+
# the Free Software Foundation; either version 2 of the License, or
|
|
10
|
+
# (at your option) any later version.
|
|
11
|
+
#
|
|
12
|
+
# This program is distributed in the hope that it will be useful,
|
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
# GNU General Public License for more details.
|
|
16
|
+
#
|
|
17
|
+
# You should have received a copy of the GNU General Public License
|
|
18
|
+
# along with this program; if not, write to the Free Software
|
|
19
|
+
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
20
|
+
#
|
|
21
|
+
# To contact David A. Wheeler, see his website at:
|
|
22
|
+
# http://www.dwheeler.com.
|
|
23
|
+
#
|
|
24
|
+
#
|
|
25
|
+
|
|
26
|
+
generic_count '#' $@
|
|
27
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
#
|
|
3
|
+
# This is part of SLOCCount, a toolsuite that counts
|
|
4
|
+
# source lines of code (SLOC).
|
|
5
|
+
# Copyright (C) 2001-2004 David A. Wheeler.
|
|
6
|
+
#
|
|
7
|
+
# This program is free software; you can redistribute it and/or modify
|
|
8
|
+
# it under the terms of the GNU General Public License as published by
|
|
9
|
+
# the Free Software Foundation; either version 2 of the License, or
|
|
10
|
+
# (at your option) any later version.
|
|
11
|
+
#
|
|
12
|
+
# This program is distributed in the hope that it will be useful,
|
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
# GNU General Public License for more details.
|
|
16
|
+
#
|
|
17
|
+
# You should have received a copy of the GNU General Public License
|
|
18
|
+
# along with this program; if not, write to the Free Software
|
|
19
|
+
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
20
|
+
#
|
|
21
|
+
# To contact David A. Wheeler, see his website at:
|
|
22
|
+
# http://www.dwheeler.com.
|
|
23
|
+
#
|
|
24
|
+
#
|
|
25
|
+
|
|
26
|
+
generic_count '#' $@
|
|
27
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
#
|
|
3
|
+
# This is part of SLOCCount, a toolsuite that counts
|
|
4
|
+
# source lines of code (SLOC).
|
|
5
|
+
# Copyright (C) 2001-2004 David A. Wheeler.
|
|
6
|
+
#
|
|
7
|
+
# This program is free software; you can redistribute it and/or modify
|
|
8
|
+
# it under the terms of the GNU General Public License as published by
|
|
9
|
+
# the Free Software Foundation; either version 2 of the License, or
|
|
10
|
+
# (at your option) any later version.
|
|
11
|
+
#
|
|
12
|
+
# This program is distributed in the hope that it will be useful,
|
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
# GNU General Public License for more details.
|
|
16
|
+
#
|
|
17
|
+
# You should have received a copy of the GNU General Public License
|
|
18
|
+
# along with this program; if not, write to the Free Software
|
|
19
|
+
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
20
|
+
#
|
|
21
|
+
# To contact David A. Wheeler, see his website at:
|
|
22
|
+
# http://www.dwheeler.com.
|
|
23
|
+
#
|
|
24
|
+
#
|
|
25
|
+
|
|
26
|
+
generic_count '#' $@
|
|
27
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# given a list of data subdirs, show how many files of each type
|
|
3
|
+
# are in each subdir.
|
|
4
|
+
#
|
|
5
|
+
# This is part of SLOCCount, a toolsuite that counts
|
|
6
|
+
# source lines of code (SLOC).
|
|
7
|
+
# Copyright (C) 2001-2004 David A. Wheeler.
|
|
8
|
+
#
|
|
9
|
+
# This program is free software; you can redistribute it and/or modify
|
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
|
11
|
+
# the Free Software Foundation; either version 2 of the License, or
|
|
12
|
+
# (at your option) any later version.
|
|
13
|
+
#
|
|
14
|
+
# This program is distributed in the hope that it will be useful,
|
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
# GNU General Public License for more details.
|
|
18
|
+
#
|
|
19
|
+
# You should have received a copy of the GNU General Public License
|
|
20
|
+
# along with this program; if not, write to the Free Software
|
|
21
|
+
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
22
|
+
#
|
|
23
|
+
# To contact David A. Wheeler, see his website at:
|
|
24
|
+
# http://www.dwheeler.com.
|
|
25
|
+
#
|
|
26
|
+
#
|
|
27
|
+
|
|
28
|
+
echo "Dir C C++ Python Asm sh csh Java Lisp Tcl Expect Perl ML Modula3 awk sed make not auto unknown"
|
|
29
|
+
|
|
30
|
+
for dir in $@
|
|
31
|
+
do
|
|
32
|
+
if [ -d "$dir" ]
|
|
33
|
+
then
|
|
34
|
+
echo $dir | tr -d '\n '; echo -n " "
|
|
35
|
+
wc -l < $dir/ansic_list.dat | tr -d '\n '; echo -n " "
|
|
36
|
+
wc -l < $dir/cpp_list.dat | tr -d '\n '; echo -n " "
|
|
37
|
+
wc -l < $dir/python_list.dat | tr -d '\n '; echo -n " "
|
|
38
|
+
wc -l < $dir/asm_list.dat | tr -d '\n '; echo -n " "
|
|
39
|
+
wc -l < $dir/sh_list.dat | tr -d '\n '; echo -n " "
|
|
40
|
+
wc -l < $dir/csh_list.dat | tr -d '\n '; echo -n " "
|
|
41
|
+
wc -l < $dir/java_list.dat | tr -d '\n '; echo -n " "
|
|
42
|
+
wc -l < $dir/lisp_list.dat | tr -d '\n '; echo -n " "
|
|
43
|
+
wc -l < $dir/tcl_list.dat | tr -d '\n '; echo -n " "
|
|
44
|
+
wc -l < $dir/exp_list.dat | tr -d '\n '; echo -n " "
|
|
45
|
+
wc -l < $dir/perl_list.dat | tr -d '\n '; echo -n " "
|
|
46
|
+
wc -l < $dir/ml_list.dat | tr -d '\n '; echo -n " "
|
|
47
|
+
wc -l < $dir/modula3_list.dat | tr -d '\n '; echo -n " "
|
|
48
|
+
wc -l < $dir/awk_list.dat | tr -d '\n '; echo -n " "
|
|
49
|
+
wc -l < $dir/sed_list.dat | tr -d '\n '; echo -n " "
|
|
50
|
+
wc -l < $dir/makefile_list.dat | tr -d '\n '; echo -n " "
|
|
51
|
+
wc -l < $dir/not_list.dat | tr -d '\n '; echo -n " "
|
|
52
|
+
wc -l < $dir/auto_list.dat | tr -d '\n '; echo -n " "
|
|
53
|
+
wc -l < $dir/unknown_list.dat | tr -d '\n '; echo -n " "
|
|
54
|
+
echo
|
|
55
|
+
fi
|
|
56
|
+
done
|
|
57
|
+
|
|
58
|
+
|