modify critic

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1375 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
alfred 2006-08-24 03:02:29 +00:00
parent 821709bd1b
commit 8a5cdc3fa6

View File

@ -54,21 +54,24 @@ public final class Critic {
} else if (line.matches("\\*\\*\\/")) { } else if (line.matches("\\*\\*\\/")) {
incomment = false; incomment = false;
templine.append(line + "\n"); templine.append(line + "\n");
} else if (incomment && line.contains("Routine Description:")) { } else if (incomment) {
if (line.contains("Routine Description:")) {
description = true; description = true;
arguments = false; arguments = false;
returns = false; returns = false;
} else if (incomment && line.contains("Arguments:")) { } else if (line.contains("Arguments:")) {
description = false; description = false;
arguments = true; arguments = true;
returns = false; returns = false;
} else if (incomment && line.contains("Returns:")) { } else if (line.contains("Returns:")) {
description = false; description = false;
arguments = false; arguments = false;
returns = true; returns = true;
} else if (incomment && description) { } else if (description) {
if (line.trim().length() != 0) {
templine.append(" " + line.trim() + "\n"); templine.append(" " + line.trim() + "\n");
} else if (incomment && arguments) { }
} else if (arguments) {
mtrcommentequation = ptncommentequation.matcher(line); mtrcommentequation = ptncommentequation.matcher(line);
if (mtrcommentequation.find()) { if (mtrcommentequation.find()) {
inequation = true; inequation = true;
@ -81,7 +84,7 @@ public final class Critic {
} else { } else {
templine.append(" " + line.trim() + "\n"); templine.append(" " + line.trim() + "\n");
} }
} else if (incomment && returns) { } else if (returns) {
mtrcommentequation = ptncommentequation.matcher(line); mtrcommentequation = ptncommentequation.matcher(line);
if (mtrcommentequation.find()) { if (mtrcommentequation.find()) {
inequation = true; inequation = true;
@ -94,6 +97,7 @@ public final class Critic {
} else { } else {
templine.append(" " + line.trim() + "\n"); templine.append(" " + line.trim() + "\n");
} }
}
} else { } else {
templine.append(line + "\n"); templine.append(line + "\n");
} }