mirror of https://github.com/acidanthera/audk.git
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:
parent
821709bd1b
commit
8a5cdc3fa6
|
@ -54,45 +54,49 @@ public final class Critic {
|
|||
} else if (line.matches("\\*\\*\\/")) {
|
||||
incomment = false;
|
||||
templine.append(line + "\n");
|
||||
} else if (incomment && line.contains("Routine Description:")) {
|
||||
description = true;
|
||||
arguments = false;
|
||||
returns = false;
|
||||
} else if (incomment && line.contains("Arguments:")) {
|
||||
description = false;
|
||||
arguments = true;
|
||||
returns = false;
|
||||
} else if (incomment && line.contains("Returns:")) {
|
||||
description = false;
|
||||
arguments = false;
|
||||
returns = true;
|
||||
} else if (incomment && description) {
|
||||
templine.append(" " + line.trim() + "\n");
|
||||
} else if (incomment && arguments) {
|
||||
mtrcommentequation = ptncommentequation.matcher(line);
|
||||
if (mtrcommentequation.find()) {
|
||||
inequation = true;
|
||||
templine.append(" @param " + mtrcommentequation.group(1) + " " + mtrcommentequation.group(2) + "\n");
|
||||
} else if (inequation && line.trim().length() == 0) {
|
||||
inequation = false;
|
||||
templine.append(line + "\n");
|
||||
} else if (inequation && line.trim().length() != 0) {
|
||||
templine.append("#%#%" + line + "\n");
|
||||
} else {
|
||||
templine.append(" " + line.trim() + "\n");
|
||||
}
|
||||
} else if (incomment && returns) {
|
||||
mtrcommentequation = ptncommentequation.matcher(line);
|
||||
if (mtrcommentequation.find()) {
|
||||
inequation = true;
|
||||
templine.append(" @retval " + mtrcommentequation.group(1) + " " + mtrcommentequation.group(2) + "\n");
|
||||
} else if (inequation && line.trim().length() == 0) {
|
||||
inequation = false;
|
||||
templine.append(line + "\n");
|
||||
} else if (inequation && line.trim().length() != 0) {
|
||||
templine.append("#%#%" + line + "\n");
|
||||
} else {
|
||||
templine.append(" " + line.trim() + "\n");
|
||||
} else if (incomment) {
|
||||
if (line.contains("Routine Description:")) {
|
||||
description = true;
|
||||
arguments = false;
|
||||
returns = false;
|
||||
} else if (line.contains("Arguments:")) {
|
||||
description = false;
|
||||
arguments = true;
|
||||
returns = false;
|
||||
} else if (line.contains("Returns:")) {
|
||||
description = false;
|
||||
arguments = false;
|
||||
returns = true;
|
||||
} else if (description) {
|
||||
if (line.trim().length() != 0) {
|
||||
templine.append(" " + line.trim() + "\n");
|
||||
}
|
||||
} else if (arguments) {
|
||||
mtrcommentequation = ptncommentequation.matcher(line);
|
||||
if (mtrcommentequation.find()) {
|
||||
inequation = true;
|
||||
templine.append(" @param " + mtrcommentequation.group(1) + " " + mtrcommentequation.group(2) + "\n");
|
||||
} else if (inequation && line.trim().length() == 0) {
|
||||
inequation = false;
|
||||
templine.append(line + "\n");
|
||||
} else if (inequation && line.trim().length() != 0) {
|
||||
templine.append("#%#%" + line + "\n");
|
||||
} else {
|
||||
templine.append(" " + line.trim() + "\n");
|
||||
}
|
||||
} else if (returns) {
|
||||
mtrcommentequation = ptncommentequation.matcher(line);
|
||||
if (mtrcommentequation.find()) {
|
||||
inequation = true;
|
||||
templine.append(" @retval " + mtrcommentequation.group(1) + " " + mtrcommentequation.group(2) + "\n");
|
||||
} else if (inequation && line.trim().length() == 0) {
|
||||
inequation = false;
|
||||
templine.append(line + "\n");
|
||||
} else if (inequation && line.trim().length() != 0) {
|
||||
templine.append("#%#%" + line + "\n");
|
||||
} else {
|
||||
templine.append(" " + line.trim() + "\n");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
templine.append(line + "\n");
|
||||
|
|
Loading…
Reference in New Issue