mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-5324 update checktags
X-SVN-Rev: 20077
This commit is contained in:
parent
40a9340aaa
commit
90d0e2bd5b
1 changed files with 9 additions and 3 deletions
|
@ -193,7 +193,7 @@ public class CheckTags {
|
|||
|
||||
static final String[] tagKinds = {
|
||||
"@internal", "@draft", "@stable", "@since", "@deprecated", "@author", "@see", "@version",
|
||||
"@param", "@return", "@throws", "@obsolete", "@exception", "@serial"
|
||||
"@param", "@return", "@throws", "@obsolete", "@exception", "@serial", "@provisional"
|
||||
};
|
||||
|
||||
static final int UNKNOWN = -1;
|
||||
|
@ -211,6 +211,7 @@ public class CheckTags {
|
|||
static final int OBSOLETE = 11;
|
||||
static final int EXCEPTION = 12;
|
||||
static final int SERIAL = 13;
|
||||
static final int PROVISIONAL = 14;
|
||||
|
||||
static int tagKindIndex(String kind) {
|
||||
for (int i = 0; i < tagKinds.length; ++i) {
|
||||
|
@ -308,6 +309,7 @@ public class CheckTags {
|
|||
Tag[] tags = doc.tags();
|
||||
boolean foundRequiredTag = false;
|
||||
boolean foundDraftTag = false;
|
||||
boolean foundProvisionalTag = false;
|
||||
boolean foundDeprecatedTag = false;
|
||||
boolean foundObsoleteTag = false;
|
||||
boolean foundInternalTag = false;
|
||||
|
@ -345,6 +347,10 @@ public class CheckTags {
|
|||
retainAll |= (tag.text().indexOf("(retainAll)") != -1);
|
||||
break;
|
||||
|
||||
case PROVISIONAL:
|
||||
foundProvisionalTag = true;
|
||||
break;
|
||||
|
||||
case DEPRECATED:
|
||||
foundDeprecatedTag = true;
|
||||
if (tag.text().indexOf("ICU") == 0) {
|
||||
|
@ -403,8 +409,8 @@ public class CheckTags {
|
|||
if (foundInternalTag && !foundDeprecatedTag) {
|
||||
errln("internal tag missing deprecated");
|
||||
}
|
||||
if (foundDraftTag && !foundDeprecatedTag) {
|
||||
errln("draft tag missing deprecated");
|
||||
if (foundDraftTag && !(foundDeprecatedTag || foundProvisionalTag)) {
|
||||
errln("draft tag missing deprecated or provisional");
|
||||
}
|
||||
if (foundObsoleteTag && !foundDeprecatedTag) {
|
||||
errln("obsolete tag missing deprecated");
|
||||
|
|
Loading…
Add table
Reference in a new issue