]> git.proxmox.com Git - mirror_edk2.git/commitdiff
modify critic
authoralfred <alfred@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 24 Aug 2006 03:02:29 +0000 (03:02 +0000)
committeralfred <alfred@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 24 Aug 2006 03:02:29 +0000 (03:02 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1375 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/MigrationTools/org/tianocore/migration/Critic.java

index c737c31403a0f15f86600e7b3ab93932b613e39b..881d3aae2cdc8713123537462e090e1a77e6c459 100644 (file)
@@ -54,45 +54,49 @@ public final class Critic {
                                } else if (line.matches("\\*\\*\\/")) {\r
                                        incomment = false;\r
                                        templine.append(line + "\n");\r
                                } else if (line.matches("\\*\\*\\/")) {\r
                                        incomment = false;\r
                                        templine.append(line + "\n");\r
-                               } else if (incomment && line.contains("Routine Description:")) {\r
-                                       description = true;\r
-                                       arguments = false;\r
-                                       returns = false;\r
-                               } else if (incomment && line.contains("Arguments:")) {\r
-                                       description = false;\r
-                                       arguments = true;\r
-                                       returns = false;\r
-                               } else if (incomment && line.contains("Returns:")) {\r
-                                       description = false;\r
-                                       arguments = false;\r
-                                       returns = true;\r
-                               } else if (incomment && description) {\r
-                                       templine.append("  " + line.trim() + "\n");\r
-                               } else if (incomment && arguments) {\r
-                                       mtrcommentequation = ptncommentequation.matcher(line);\r
-                                       if (mtrcommentequation.find()) {\r
-                                               inequation = true;\r
-                                               templine.append("  @param  " + mtrcommentequation.group(1) + "     " + mtrcommentequation.group(2) + "\n");\r
-                                       } else if (inequation && line.trim().length() == 0) {\r
-                                               inequation = false;\r
-                                               templine.append(line + "\n");\r
-                                       } else if (inequation && line.trim().length() != 0) {\r
-                                               templine.append("#%#%" + line + "\n");\r
-                                       } else {\r
-                                               templine.append("  " + line.trim() + "\n");\r
-                                       }\r
-                               } else if (incomment && returns) {\r
-                                       mtrcommentequation = ptncommentequation.matcher(line);\r
-                                       if (mtrcommentequation.find()) {\r
-                                               inequation = true;\r
-                                               templine.append("  @retval " + mtrcommentequation.group(1) + "     " + mtrcommentequation.group(2) + "\n");\r
-                                       } else if (inequation && line.trim().length() == 0) {\r
-                                               inequation = false;\r
-                                               templine.append(line + "\n");\r
-                                       } else if (inequation && line.trim().length() != 0) {\r
-                                               templine.append("#%#%" + line + "\n");\r
-                                       } else {\r
-                                               templine.append("  " + line.trim() + "\n");\r
+                               } else if (incomment) {\r
+                                       if (line.contains("Routine Description:")) {\r
+                                               description = true;\r
+                                               arguments = false;\r
+                                               returns = false;\r
+                                       } else if (line.contains("Arguments:")) {\r
+                                               description = false;\r
+                                               arguments = true;\r
+                                               returns = false;\r
+                                       } else if (line.contains("Returns:")) {\r
+                                               description = false;\r
+                                               arguments = false;\r
+                                               returns = true;\r
+                                       } else if (description) {\r
+                                               if (line.trim().length() != 0) {\r
+                                                       templine.append("  " + line.trim() + "\n");\r
+                                               }\r
+                                       } else if (arguments) {\r
+                                               mtrcommentequation = ptncommentequation.matcher(line);\r
+                                               if (mtrcommentequation.find()) {\r
+                                                       inequation = true;\r
+                                                       templine.append("  @param  " + mtrcommentequation.group(1) + "     " + mtrcommentequation.group(2) + "\n");\r
+                                               } else if (inequation && line.trim().length() == 0) {\r
+                                                       inequation = false;\r
+                                                       templine.append(line + "\n");\r
+                                               } else if (inequation && line.trim().length() != 0) {\r
+                                                       templine.append("#%#%" + line + "\n");\r
+                                               } else {\r
+                                                       templine.append("  " + line.trim() + "\n");\r
+                                               }\r
+                                       } else if (returns) {\r
+                                               mtrcommentequation = ptncommentequation.matcher(line);\r
+                                               if (mtrcommentequation.find()) {\r
+                                                       inequation = true;\r
+                                                       templine.append("  @retval " + mtrcommentequation.group(1) + "     " + mtrcommentequation.group(2) + "\n");\r
+                                               } else if (inequation && line.trim().length() == 0) {\r
+                                                       inequation = false;\r
+                                                       templine.append(line + "\n");\r
+                                               } else if (inequation && line.trim().length() != 0) {\r
+                                                       templine.append("#%#%" + line + "\n");\r
+                                               } else {\r
+                                                       templine.append("  " + line.trim() + "\n");\r
+                                               }\r
                                        }\r
                                } else {\r
                                        templine.append(line + "\n");\r
                                        }\r
                                } else {\r
                                        templine.append(line + "\n");\r