Skip to content

Commit 03c5c60

Browse files
committed
Enable svn keyword substitution on some more files.
git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@484 c6a108a4-781c-0410-a6c6-c2d559e19af0
1 parent 0f9cbf1 commit 03c5c60

File tree

6 files changed

+44
-15
lines changed

6 files changed

+44
-15
lines changed

buildOnJdk.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@echo off
2-
rem $Id: //open/mondrian/buildOnJdk.bat#2 $
2+
rem $Id$
33
rem
44
rem Licensed to Julian Hyde under one or more contributor license
55
rem agreements. See the NOTICE file distributed with this work for

buildOnJdk.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# $Id: //open/mondrian/buildOnJdk.sh#2 $
2+
# $Id$
33
#
44
# Licensed to Julian Hyde under one or more contributor license
55
# agreements. See the NOTICE file distributed with this work for

checkFile.awk

+36-9
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function _matchFile(fname) {
3333
|| fname ~ "/fennel/" \
3434
|| fname ~ "/extensions/" \
3535
|| fname ~ "/com/sqlstream/" \
36-
|| !lenient;
36+
|| strict > 0;
3737
}
3838
function _isCpp(fname) {
3939
return fname ~ /\.(cpp|h)$/;
@@ -109,7 +109,7 @@ BEGIN {
109109
quot = sprintf("%c", 34);
110110
lf = sprintf("%c", 13);
111111
pattern = apos "(\\" apos "|[^" apos "])" apos;
112-
if (0) printf "maxLineLength=%s lenient=%s\n", maxLineLength, lenient;
112+
if (0) printf "maxLineLength=%s strict=%s\n", maxLineLength, strict;
113113
}
114114
FNR == 1 {
115115
if (fname) {
@@ -229,7 +229,6 @@ FNR == 1 {
229229
thisImport = $2;
230230
gsub(/;/, "", thisImport);
231231
gsub(/\*/, "", thisImport);
232-
importGroup = "zzzzzzzzzzzzzzzzz";
233232
if (thisPackage ~ /^mondrian.*/ && thisImport ~ /^mondrian.*/ \
234233
|| thisPackage ~ /^org.olap4j.*/ && thisImport ~ /^org.olap4j.*/)
235234
{
@@ -257,7 +256,7 @@ FNR == 1 {
257256
if (!previousLineWasEmpty) {
258257
error(fname, FNR, "Expected blank line between import groups");
259258
} else if (prevImportGroup > importGroup) {
260-
error(fname, FNR, "Import group out of sequence" importGroup prevImportGroup);
259+
error(fname, FNR, "Import group out of sequence (should precede " prevImportGroup ")");
261260
}
262261
} else if (prevImport \
263262
&& prevImport > thisImport \
@@ -269,6 +268,34 @@ FNR == 1 {
269268
prevImport = thisImport;
270269
prevImportGroup = importGroup;
271270
}
271+
/^\/\/ Copyright .* Julian/ && strict {
272+
if ($0 !~ /-2012/) {
273+
error(fname, FNR, "copyright is not current");
274+
}
275+
}
276+
/(static|public|private|protected|final|abstract)/ && !/import/ && strict > 1 {
277+
# Order of qualifiers: "public/private/protected static final abstract class ..."
278+
s2 = s;
279+
gsub(/\(.*$/, "", s2);
280+
if (s2 ~ /abstract .*final/) {
281+
error(fname, FNR, "'final' must come before 'abstract'");
282+
}
283+
if (s2 ~ /final .*static/) {
284+
error(fname, FNR, "'static' must come before 'final'");
285+
}
286+
if (s2 ~ /abstract .*static/) {
287+
error(fname, FNR, "'static' must come before 'abstract'");
288+
}
289+
if (s2 ~ /static .*(public|protected|private)/) {
290+
error(fname, FNR, "'public/private/protected' must come before 'static'");
291+
}
292+
if (s2 ~ /final .*(public|protected|private)/) {
293+
error(fname, FNR, "'public/private/protected' must come before 'final'");
294+
}
295+
if (s2 ~ /abstract .*(public|protected|private)/) {
296+
error(fname, FNR, "'public/private/protected' must come before 'abstract'");
297+
}
298+
}
272299
/^$/ {
273300
if (matchFile && previousLineEndedInOpenBrace) {
274301
error(fname, FNR, "Empty line following open brace");
@@ -504,7 +531,7 @@ match(s, /([]A-Za-z0-9() ] *)(+|-|\*|\^|\/|%|=|==|+=|-=|\*=|\/=|>=|<=|!=|&|&&|\|
504531
else if (a[2] == "&" && isCpp && s ~ /&[^ ]/) {} # ignore case "foo(&x)" in c++
505532
else if (isCpp && s ~ /\<operator[^ ]+\(/) {} # ignore e.g. "operator++()" in c++
506533
else if (isCpp && a[2] == "/" && s ~ /#include/) {} # ignore e.g. "#include <x/y.hpp>" in c++
507-
else if (lenient && fname ~ /(fennel)/ && a[1] = ",") {} # not enabled yet
534+
else if (strict < 2 && fname ~ /(fennel)/ && a[1] = ",") {} # not enabled yet
508535
else {
509536
error(fname, FNR, "operator '" a[2] "' must be followed by space");
510537
}
@@ -518,8 +545,8 @@ match(s, /( )(,)/, a) {
518545
}
519546
match(s, / (+|-|\*|\/|==|>=|<=|!=|<<|<<<|>>|&|&&|\|\||\?|:)$/, a) || \
520547
match(s, /(\.|->)$/, a) {
521-
if (lenient && fname ~ /(aspen)/ && a[1] != ":") {} # not enabled yet
522-
else if (lenient && fname ~ /(fennel|farrago|aspen)/ && a[1] = "+") {} # not enabled yet
548+
if (strict < 2 && fname ~ /(aspen)/ && a[1] != ":") {} # not enabled yet
549+
else if (strict < 2 && fname ~ /(fennel|farrago|aspen)/ && a[1] = "+") {} # not enabled yet
523550
else if (a[1] == ":" && s ~ /(case.*|default):$/) {
524551
# ignore e.g. "case 5:"
525552
} else if ((a[1] == "*" || a[1] == "&") && isCpp && s ~ /^[[:alnum:]:_ ]* [*&]$/) {
@@ -623,7 +650,7 @@ s ~ /{/ {
623650
gsub(/[^(]/, "", opens);
624651
closes = s;
625652
gsub(/[^)]/, "", closes);
626-
if (0 && lenient && fname ~ /aspen/) {} # not enabled
653+
if (0 && strict < 2 && fname ~ /aspen/) {} # not enabled
627654
else if (length(closes) > length(opens)) {
628655
error(fname, FNR, "Open brace should be on new line (function call/decl spans several lines)");
629656
}
@@ -694,7 +721,7 @@ length($0) > maxLineLength \
694721
if (funDeclStartLine < FNR \
695722
&& $0 !~ /^ *{$/)
696723
{
697-
if (lenient && fname ~ /aspen/) {} # not enabled
724+
if (strict < 2 && fname ~ /aspen/) {} # not enabled
698725
else error(fname, FNR, "Open brace should be on new line (function decl spans several lines)");
699726
}
700727
funDeclStartLine = 0;

checkFile.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# $Id: //open/mondrian-release/3.2/bin/checkFile.sh#2 $
2+
# $Id$
33
#
44
# Licensed to Julian Hyde under one or more contributor license
55
# agreements. See the NOTICE file distributed with this work for
@@ -44,6 +44,8 @@ usage() {
4444
echo "--lenient"
4545
echo " Does not apply rules to components which are not known to"
4646
echo " be in compliance. The perforce trigger uses this option."
47+
echo "--strict"
48+
echo " Stricter than usual; the opposite of lenient."
4749
}
4850

4951
doCheck() {

src/org/olap4j/query/LevelSelectionImpl.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
// $Id: LevelSelectionImpl.java 399 2011-02-03 20:53:50Z pstoellberger $
2+
// $Id$
33
//
44
// Licensed to Julian Hyde under one or more contributor license
55
// agreements. See the NOTICE file distributed with this work for
@@ -28,7 +28,7 @@
2828
* Abstract implementation of {@link Selection}.
2929
*
3030
* @author pstoellberger
31-
* @version $Id: LevelSelectionImpl.java 454 2011-05-15 20:53:50Z pstoellberger $
31+
* @version $Id$
3232
* @since Feb 3, 2011
3333
*/
3434
class LevelSelectionImpl extends AbstractSelection {

subfloor.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--===========================================================================
22
/*
3-
// $Id: subfloor.xml $
3+
// $Id$
44
//
55
// Licensed to Julian Hyde under one or more contributor license
66
// agreements. See the NOTICE file distributed with this work for

0 commit comments

Comments
 (0)