corrected misspelling of "precede", bug 744342

This commit is contained in:
Rick Giles 2003-07-14 10:24:01 +00:00
parent 35e4a41c10
commit e55435125e
16 changed files with 70 additions and 68 deletions

View File

@ -154,6 +154,8 @@
<li class="body">Fixed grammar definition for identifiers to
handle all Unicode symbols (bug 755744)</li>
<li class="body">Corrected misspelling of &quot;precede&quot; (bug 744342)</li>
</ul>

View File

@ -60,7 +60,7 @@ public class SlistHandler extends BlockParentHandler
// }
// }
// ... the case SLIST is followed by a user-created SLIST and
// preceeded by a switch
// preceded by a switch
// if our parent is a block handler we want to be transparent
if ((getParent() instanceof BlockParentHandler

View File

@ -77,14 +77,14 @@ abstract class AbstractParenPadCheck
&& Character.isWhitespace(line.charAt(before))
&& !Utils.whitespaceBefore(before, line))
{
log(aAST.getLineNo(), before, "ws.preceeded", ")");
log(aAST.getLineNo(), before, "ws.preceded", ")");
}
else if ((PadOption.SPACE == getAbstractOption())
&& !Character.isWhitespace(line.charAt(before))
&& (line.charAt(before) != '('))
{
log(aAST.getLineNo(), aAST.getColumnNo(),
"ws.notPreceeded", ")");
"ws.notPreceded", ")");
}
}
}

View File

@ -26,7 +26,7 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes;
/**
* <p>
* Checks that there is no whitespace before a token.
* More specifically, it checks that it is not preceeded with whitespace,
* More specifically, it checks that it is not preceded with whitespace,
* or (if linebreaks are allowed) all characters on the line before are
* whitespace. To allow linebreaks before a token, set property
* allowLineBreaks to true.
@ -99,7 +99,7 @@ public class NoWhitespaceBeforeCheck
}
}
if (flag) {
log(aAST.getLineNo(), before, "ws.preceeded", aAST.getText());
log(aAST.getLineNo(), before, "ws.preceded", aAST.getText());
}
}
}

View File

@ -38,12 +38,12 @@ public final class PadOption
/**
* Represents no spacing following a left parenthesis
* or preceeding a right one.
* or preceding a right one.
*/
public static final PadOption NOSPACE = new PadOption("nospace");
/**
* Represents mandatory spacing following a left parenthesis
* and preceeding a right one.
* and preceeing a right one.
*/
public static final PadOption SPACE = new PadOption("space");

View File

@ -185,7 +185,7 @@ public class WhitespaceAroundCheck
if ((before >= 0) && !Character.isWhitespace(line.charAt(before))) {
log(aAST.getLineNo(), aAST.getColumnNo(),
"ws.notPreceeded", new Object[]{aAST.getText()});
"ws.notPreceded", new Object[]{aAST.getText()});
}
if (after >= line.length()) {

View File

@ -7,5 +7,5 @@ line.same=''{0}'' should be on the same line.
ws.followed=''{0}'' is followed by whitespace.
ws.notFollowed=''{0}'' is not followed by whitespace.
ws.notPreceeded=''{0}'' is not preceeded with whitespace.
ws.preceeded=''{0}'' is preceeded with whitespace.
ws.notPreceded=''{0}'' is not preceded with whitespace.
ws.preceded=''{0}'' is preceded with whitespace.

View File

@ -7,5 +7,5 @@ line.same=''{0}'' sollte in derselben Zeile stehen.
ws.followed=Nach ''{0}'' steht ein Whitespace.
ws.notFollowed=Nach ''{0}'' steht kein Whitespace.
ws.notPreceeded=Vor ''{0}'' steht kein Whitespace.
ws.preceeded=Vor ''{0}'' steht ein Whitespace.
ws.notPreceded=Vor ''{0}'' steht kein Whitespace.
ws.preceded=Vor ''{0}'' steht ein Whitespace.

View File

@ -7,5 +7,5 @@ line.same=''{0}'' pitää olla samalla rivillä.
ws.followed=''{0}'':ta seuraa välilyönti.
ws.notFollowed=''{0}'':ta ei seuraa välilyönti.
ws.notPreceeded=''{0}'':ta ei edellä välilyönti.
ws.preceeded=''{0}'':ta edeltää välilyönti.
ws.notPreceded=''{0}'':ta ei edellä välilyönti.
ws.preceded=''{0}'':ta edeltää välilyönti.

View File

@ -7,5 +7,5 @@ line.same=''{0}'' devrait
ws.followed=Il y a un espace de trop après ''{0}''.
ws.notFollowed=Il manque un espace après ''{0}''.
ws.notPreceeded=Il manque un espace avant ''{0}''.
ws.preceeded=Il y a un espace de trop avant ''{0}''.
ws.notPreceded=Il manque un espace avant ''{0}''.
ws.preceded=Il y a un espace de trop avant ''{0}''.

View File

@ -7,5 +7,5 @@ line.same=''{0}''
ws.followed=''{0}'' の後にホワイトスペースがあります。
ws.notFollowed=''{0}'' の後にホワイトスペースがありません。
ws.notPreceeded=''{0}'' の前にホワイトスペースがありません。
ws.preceeded=''{0}'' の前にホワイトスペースがあります。
ws.notPreceded=''{0}'' の前にホワイトスペースがありません。
ws.preceded=''{0}'' の前にホワイトスペースがあります。

View File

@ -7,5 +7,5 @@ line.same=''{0}'' deve estar na mesma linha.
ws.followed=''{0}'' é seguido de espaço em branco.
ws.notFollowed=''{0}'' não é seguido de espaço em branco.
ws.notPreceeded=''{0}'' não é precedido por espaço em branco.
ws.preceeded=''{0}'' é precedido por espaço em branco.
ws.notPreceded=''{0}'' não é precedido por espaço em branco.
ws.preceded=''{0}'' é precedido por espaço em branco.

View File

@ -15,10 +15,10 @@ public class NoWhitespaceBeforeCheckTest
public void testDefault() throws Exception
{
final String[] expected = {
"30:14: '++' is preceeded with whitespace.",
"30:21: '--' is preceeded with whitespace.",
"176:18: ';' is preceeded with whitespace.",
"178:23: ';' is preceeded with whitespace.",
"30:14: '++' is preceded with whitespace.",
"30:21: '--' is preceded with whitespace.",
"176:18: ';' is preceded with whitespace.",
"178:23: ';' is preceded with whitespace.",
};
verify(checkConfig, getPath("InputWhitespace.java"), expected);
}
@ -27,11 +27,11 @@ public class NoWhitespaceBeforeCheckTest
{
checkConfig.addAttribute("tokens", "DOT");
final String[] expected = {
"5:12: '.' is preceeded with whitespace.",
"6:4: '.' is preceeded with whitespace.",
"129:17: '.' is preceeded with whitespace.",
"135:12: '.' is preceeded with whitespace.",
"136:10: '.' is preceeded with whitespace.",
"5:12: '.' is preceded with whitespace.",
"6:4: '.' is preceded with whitespace.",
"129:17: '.' is preceded with whitespace.",
"135:12: '.' is preceded with whitespace.",
"136:10: '.' is preceded with whitespace.",
};
verify(checkConfig, getPath("InputWhitespace.java"), expected);
}
@ -42,9 +42,9 @@ public class NoWhitespaceBeforeCheckTest
checkConfig.addAttribute("tokens", "DOT");
checkConfig.addAttribute("allowLineBreaks", "yes");
final String[] expected = {
"5:12: '.' is preceeded with whitespace.",
"129:17: '.' is preceeded with whitespace.",
"136:10: '.' is preceeded with whitespace.",
"5:12: '.' is preceded with whitespace.",
"129:17: '.' is preceded with whitespace.",
"136:10: '.' is preceded with whitespace.",
};
verify(checkConfig, getPath("InputWhitespace.java"), expected);
}

View File

@ -13,9 +13,9 @@ public class ParenPadCheckTest
createCheckConfig(ParenPadCheck.class);
final String[] expected = {
"58:12: '(' is followed by whitespace.",
"58:36: ')' is preceeded with whitespace.",
"58:36: ')' is preceded with whitespace.",
"74:13: '(' is followed by whitespace.",
"74:18: ')' is preceeded with whitespace.",
"74:18: ')' is preceded with whitespace.",
};
verify(checkConfig, getPath("InputWhitespace.java"), expected);
}
@ -28,27 +28,27 @@ public class ParenPadCheckTest
checkConfig.addAttribute("option", PadOption.SPACE.toString());
final String[] expected = {
"29:20: '(' is not followed by whitespace.",
"29:23: ')' is not preceeded with whitespace.",
"29:23: ')' is not preceded with whitespace.",
"37:22: '(' is not followed by whitespace.",
"37:26: ')' is not preceeded with whitespace.",
"37:26: ')' is not preceded with whitespace.",
"41:15: '(' is not followed by whitespace.",
"41:33: ')' is not preceeded with whitespace.",
"41:33: ')' is not preceded with whitespace.",
"76:20: '(' is not followed by whitespace.",
"76:21: ')' is not preceeded with whitespace.",
"76:21: ')' is not preceded with whitespace.",
"97:22: '(' is not followed by whitespace.",
"97:28: ')' is not preceeded with whitespace.",
"97:28: ')' is not preceded with whitespace.",
"98:14: '(' is not followed by whitespace.",
"98:18: ')' is not preceeded with whitespace.",
"98:18: ')' is not preceded with whitespace.",
"150:28: '(' is not followed by whitespace.",
"150:32: ')' is not preceeded with whitespace.",
"150:32: ')' is not preceded with whitespace.",
"153:16: '(' is not followed by whitespace.",
"153:20: ')' is not preceeded with whitespace.",
"153:20: ')' is not preceded with whitespace.",
"160:21: '(' is not followed by whitespace.",
"160:34: ')' is not preceeded with whitespace.",
"160:34: ')' is not preceded with whitespace.",
"162:20: '(' is not followed by whitespace.",
"165:10: ')' is not preceeded with whitespace.",
"165:10: ')' is not preceded with whitespace.",
"178:14: '(' is not followed by whitespace.",
"178:36: ')' is not preceeded with whitespace.",
"178:36: ')' is not preceded with whitespace.",
};
verify(checkConfig, getPath("InputWhitespace.java"), expected);
}
@ -59,8 +59,8 @@ public class ParenPadCheckTest
final DefaultConfiguration checkConfig =
createCheckConfig(ParenPadCheck.class);
final String[] expected = {
"17:34: ')' is preceeded with whitespace.",
"20:35: ')' is preceeded with whitespace.",
"17:34: ')' is preceded with whitespace.",
"20:35: ')' is preceded with whitespace.",
};
verify(checkConfig, getPath("InputForWhitespace.java"), expected);
}
@ -73,9 +73,9 @@ public class ParenPadCheckTest
checkConfig.addAttribute("option", PadOption.SPACE.toString());
final String[] expected = {
"11:14: '(' is not followed by whitespace.",
"11:35: ')' is not preceeded with whitespace.",
"11:35: ')' is not preceded with whitespace.",
"14:14: '(' is not followed by whitespace.",
"14:34: ')' is not preceeded with whitespace.",
"14:34: ')' is not preceded with whitespace.",
"17:14: '(' is not followed by whitespace.",
"20:14: '(' is not followed by whitespace.",
"23:14: '(' is not followed by whitespace.",

View File

@ -13,7 +13,7 @@ public class TypecastParenPadCheckTest
createCheckConfig(TypecastParenPadCheck.class);
final String[] expected = {
"89:14: '(' is followed by whitespace.",
"89:21: ')' is preceeded with whitespace.",
"89:21: ')' is preceded with whitespace.",
};
verify(checkConfig, getPath("InputWhitespace.java"), expected);
}
@ -26,11 +26,11 @@ public class TypecastParenPadCheckTest
checkConfig.addAttribute("option", PadOption.SPACE.toString());
final String[] expected = {
"87:21: '(' is not followed by whitespace.",
"87:27: ')' is not preceeded with whitespace.",
"87:27: ')' is not preceded with whitespace.",
"88:14: '(' is not followed by whitespace.",
"88:20: ')' is not preceeded with whitespace.",
"88:20: ')' is not preceded with whitespace.",
"90:14: '(' is not followed by whitespace.",
"90:20: ')' is not preceeded with whitespace.",
"90:20: ')' is not preceded with whitespace.",
};
verify(checkConfig, getPath("InputWhitespace.java"), expected);
}

View File

@ -12,40 +12,40 @@ public class WhitespaceAroundTest
final DefaultConfiguration checkConfig =
createCheckConfig(WhitespaceAroundCheck.class);
final String[] expected = {
"16:22: '=' is not preceeded with whitespace.",
"16:22: '=' is not preceded with whitespace.",
"16:23: '=' is not followed by whitespace.",
"18:24: '=' is not followed by whitespace.",
"26:14: '=' is not preceeded with whitespace.",
"27:10: '=' is not preceeded with whitespace.",
"26:14: '=' is not preceded with whitespace.",
"27:10: '=' is not preceded with whitespace.",
"27:11: '=' is not followed by whitespace.",
"28:10: '+=' is not preceeded with whitespace.",
"28:10: '+=' is not preceded with whitespace.",
"28:12: '+=' is not followed by whitespace.",
"29:13: '-=' is not followed by whitespace.",
"37:21: 'synchronized' is not followed by whitespace.",
"39:12: 'try' is not followed by whitespace.",
"39:12: '{' is not preceeded with whitespace.",
"39:12: '{' is not preceded with whitespace.",
"41:14: 'catch' is not followed by whitespace.",
"41:34: '{' is not preceeded with whitespace.",
"41:34: '{' is not preceded with whitespace.",
"58:11: 'if' is not followed by whitespace.",
"76:19: 'return' is not followed by whitespace.",
"97:29: '?' is not preceeded with whitespace.",
"97:29: '?' is not preceded with whitespace.",
"97:30: '?' is not followed by whitespace.",
"97:34: ':' is not preceeded with whitespace.",
"97:34: ':' is not preceded with whitespace.",
"97:35: ':' is not followed by whitespace.",
"98:15: '==' is not preceeded with whitespace.",
"98:15: '==' is not preceded with whitespace.",
"98:17: '==' is not followed by whitespace.",
"104:20: '*' is not followed by whitespace.",
"104:21: '*' is not preceeded with whitespace.",
"119:18: '%' is not preceeded with whitespace.",
"104:21: '*' is not preceded with whitespace.",
"119:18: '%' is not preceded with whitespace.",
"120:20: '%' is not followed by whitespace.",
"121:18: '%' is not preceeded with whitespace.",
"121:18: '%' is not preceded with whitespace.",
"121:19: '%' is not followed by whitespace.",
"123:18: '/' is not preceeded with whitespace.",
"123:18: '/' is not preceded with whitespace.",
"124:20: '/' is not followed by whitespace.",
"125:18: '/' is not preceeded with whitespace.",
"125:18: '/' is not preceded with whitespace.",
"125:19: '/' is not followed by whitespace.",
"153:15: 'assert' is not followed by whitespace.",
"156:20: ':' is not preceeded with whitespace.",
"156:20: ':' is not preceded with whitespace.",
"156:21: ':' is not followed by whitespace.",
};
verify(checkConfig, getPath("InputWhitespace.java"), expected);