修复typeAPI误报参数类型误报bug,门禁删掉误上的错误码重复校验,更新词库配置文件,修复工具打包报错

Signed-off-by: fanjiaojiao0729 <fanjiaojiao@huawei.com>
This commit is contained in:
fanjiaojiao0729 2024-07-03 16:51:00 +08:00
parent d804c7a362
commit 5e4c1ee0a2
5 changed files with 210 additions and 21 deletions

View File

@ -570,7 +570,6 @@ const ruleArr = ["API_DOC_ATOMICSERVICE_01",
"API_DOC_THROWS_01",
"API_DOC_THROWS_02",
"API_DOC_THROWS_03",
"API_DOC_THROWS_08",
"API_DOC_TYPE_01",
"API_DOC_TYPE_02",
"API_DOC_TYPE_03",

View File

@ -8,7 +8,7 @@
"test": "echo \"Error: no test specified\" && exit 1",
"testAll": "mocha --config test/mocha/.mocharc.jsonc",
"pack": "cross-env NODE_ENV='production' webpack --mode=production",
"build": "npm run pack --bundle",
"build": "npm run pack --bundle --stats-error-details",
"product": "ts-node src/main.ts -i test/debug/ut_nest_007.d.ts -o test/debug/output.json"
},
"keywords": [],
@ -28,7 +28,7 @@
"@types/commander": "^2.12.2",
"@types/exceljs": "^1.3.0",
"@types/fs-extra": "^9.0.13",
"@types/lodash": "^4.14.198",
"@types/lodash": "~4.14.198",
"@types/mocha": "^7.0.2",
"@types/node": "^12.18.4",
"@types/prettier": "^2.4.4",

File diff suppressed because one or more lines are too long

View File

@ -3,12 +3,14 @@
"a256",
"a2dpsource",
"aafwk",
"aabb",
"abilityname",
"abilityslice",
"abnormally",
"accelerates",
"accents",
"accommodates",
"aces",
"acmmax",
"acn",
"activates",
@ -20,10 +22,13 @@
"advertisements",
"affinities",
"agrees",
"aiding",
"aifc",
"alerting",
"algrithom",
"aligns",
"alpha",
"alpn",
"alpnprotocols",
"alterase",
"alternating",
@ -35,6 +40,7 @@
"animatable",
"annually",
"antialias",
"antialiasing",
"apdu",
"apecified",
"apertures",
@ -56,19 +62,24 @@
"atqa",
"attaches",
"attachment0",
"attackers",
"attribs",
"audios",
"authenticates",
"authinfo",
"authmode",
"autocorrect",
"autosizing",
"averr",
"avoidareachange",
"avrcp",
"avsession",
"backgrounding",
"backpress",
"backs",
"base64",
"bassboost",
"batching",
"beta1",
"bevels",
"bgra",
@ -98,6 +109,7 @@
"bundlestat",
"buttonconfig",
"bypassed",
"bypassing",
"bytrace",
"callbackfn",
"camped",
@ -110,16 +122,21 @@
"cdma",
"ce",
"certsign",
"cfa",
"cfb",
"cft",
"channeldown",
"channelup",
"checkboxgroup",
"checksum",
"chload",
"chromaticities",
"chromaticity",
"chrominance",
"circled",
"clamped",
"clamps",
"cleartext",
"cloudfile",
"coincides",
"collaborated",
@ -128,6 +145,7 @@
"collectable",
"colno",
"colorfilter",
"complied",
"complies",
"compositing",
"compresses",
@ -135,6 +153,7 @@
"conferencing",
"confpersist",
"connectable",
"consecutively",
"contentful",
"contex",
"controlpanel",
@ -146,14 +165,17 @@
"cpy",
"creatable",
"crl",
"crls",
"crops",
"crosshair",
"crowdtest",
"crowdtested",
"crowdtesting",
"csh",
"cubemap",
"cug",
"cyclewindows",
"cyclically",
"daltonization",
"darkens",
"darkest",
@ -167,10 +189,13 @@
"ddmp",
"de",
"deactivated",
"deactivates",
"deactivation",
"decodes",
"decomposed",
"decompression",
"decompressed",
"decompresses",
"decompressing",
"decr",
"decrypts",
@ -187,18 +212,25 @@
"deselected",
"designative",
"desynchronized",
"detaches",
"detaching",
"detents",
"developtools",
"devicemanager",
"dfactor",
"dfx",
"dialling",
"differed",
"digidesign",
"digitized",
"dimbehind",
"dirent",
"dirxml",
"disables",
"disallowed",
"disallowing",
"disallows",
"discards",
"discharging",
"disconnecting",
"disconnection",
@ -208,10 +240,13 @@
"dismissing",
"dispatches",
"displacement",
"dlna",
"dlp",
"dnd",
"dng",
"dnses",
"donot",
"dop",
"downlink",
"downmix",
"dpad",
@ -232,7 +267,9 @@
"ece",
"edr",
"efuse",
"efx",
"egid",
"enhancing",
"ehrpd",
"ejectclosecd",
"emption",
@ -247,6 +284,7 @@
"enrolled",
"enrolls",
"enumeratable",
"equirectangular",
"erasing",
"eration",
"errcode",
@ -262,6 +300,7 @@
"exempted",
"extention",
"f1",
"fatally",
"faultlog",
"faultlogger",
"fchmod",
@ -272,13 +311,18 @@
"fileio",
"fileshare",
"fillets",
"finer",
"flac",
"flashpix",
"flg",
"flushes",
"foiling",
"foldable",
"foregrounding",
"formatable",
"formulat",
"forwardmail",
"fov",
"freesize",
"fstat",
"fsync",
@ -292,9 +336,41 @@
"getunfilteredlinkurl",
"glasses",
"gnss",
"goaway",
"graphicseditor",
"granting",
"greate",
"gtc",
"gunzip",
"gz_headerp",
"gzbuffer",
"gzclearerr",
"gzclose",
"gzcloser",
"gzclosew",
"gzcompress",
"gzdirect",
"gzdopen",
"gzeof",
"gzerror",
"gzflush",
"gzfread",
"gzfwrite",
"gzgets",
"gzgetc",
"gzoffset",
"gzopenw",
"gzopen",
"gzprintf",
"gzputc",
"gzputs",
"gzread",
"gzrewind",
"gzseek",
"gzsetparams",
"gztell",
"gzungetc",
"gzwrite",
"hailing",
"handheld",
"handhold",
@ -309,8 +385,11 @@
"haptic",
"haptics",
"hce",
"hcrc",
"hdcp",
"hdoc",
"headed",
"headerp",
"headersreceive",
"headphones",
"heapsnapshot",
@ -327,6 +406,7 @@
"hierarchically",
"hifi",
"hilog",
"hinote",
"hisysevent",
"hitrace",
"hiview",
@ -340,6 +420,7 @@
"htmltext",
"huks",
"hwid",
"icann",
"icq",
"id",
"idm",
@ -352,6 +433,7 @@
"imengine",
"immersive",
"imms",
"improperly",
"ims",
"imsi",
"inactived",
@ -383,11 +465,14 @@
"interworking",
"invalidates",
"ipaddr",
"irradiance",
"isdn",
"isim",
"issuers",
"ivi",
"iwlan",
"jank",
"jfx",
"jis",
"judged",
"kaihong",
@ -404,6 +489,7 @@
"kvpairs",
"kvstore",
"lable",
"lacked",
"lanes",
"lasted",
"lastmode",
@ -416,6 +502,7 @@
"lclampf",
"ldpi",
"lenum",
"leye",
"lfloat",
"libraryname",
"lifted",
@ -443,6 +530,7 @@
"lubyte",
"luint",
"luma",
"lumination",
"lushort",
"lux",
"mah",
@ -455,6 +543,7 @@
"mediaquery",
"meid",
"messageerror",
"meshes",
"metered",
"metering",
"mgf",
@ -462,7 +551,11 @@
"mifare",
"minibar",
"minimizing",
"minors",
"minorsmode",
"mirrored",
"misconfigured",
"mismatches",
"missions",
"mkdtemp",
"mmax",
@ -471,6 +564,7 @@
"mnc",
"moderately",
"moitor",
"moov",
"mplink",
"mschap",
"msdos",
@ -487,6 +581,7 @@
"multitask",
"mutes",
"narrowband",
"navigations",
"nci",
"ndef",
"neglects",
@ -495,14 +590,21 @@
"netmask",
"nets",
"nextgroup",
"nitems",
"nlink",
"nmea",
"nnrt",
"nnrtdevice",
"nopadding",
"mori",
"no_gzcompress",
"nodownload",
"nofullscreen",
"noremoteplayback",
"normalizer",
"notifies",
"notifying",
"nprintf",
"numpad",
"nvalidates",
"nweb",
@ -522,7 +624,10 @@
"onrepeat",
"oob",
"oobinline",
"opendocument",
"openexr",
"openharmony",
"opentype",
"oper",
"operated",
"operatorconfigs",
@ -530,16 +635,21 @@
"opl",
"opname",
"option",
"opto",
"originating",
"osd",
"ota",
"ott",
"ounted",
"outlines",
"overheated",
"overlimit",
"overline",
"owningproperties",
"ows",
"oximeter",
"p2p",
"paddings",
"paginated",
"paramcheck",
"parameterf",
@ -557,13 +667,20 @@
"peap",
"persion",
"persistable",
"persistently",
"perso",
"personalisation",
"pertaining",
"pfa",
"pfb",
"pgo",
"photographing",
"phonemes",
"phy",
"pickers",
"pixelmap",
"pkzip",
"pkzip_bug_workaround",
"playpause",
"playstate",
"plmn",
@ -582,8 +699,10 @@
"preconnect",
"preconnected",
"preconnectable",
"preconnecting",
"preempted",
"preferentially",
"prefetched",
"preinstalled",
"prelaunch",
"preloads",
@ -592,8 +711,10 @@
"premultiply",
"prepares",
"preresolve",
"presentationml",
"presently",
"presistent",
"previewed",
"prevgroup",
"prikey",
"primaries",
@ -609,13 +730,16 @@
"pssh",
"puk",
"pvr",
"quant",
"querier",
"queriers",
"racing",
"radiuses",
"rasterizer",
"rawfile",
"rdb",
"rdev",
"reallocate",
"reassociate",
"rebounds",
"recalculated",
@ -629,6 +753,7 @@
"redirections",
"refill",
"refusing",
"rehandshake",
"rejects",
"relocation",
"remidner",
@ -636,9 +761,13 @@
"removable",
"renderbuffer",
"renderbuffertarget",
"renegotiation",
"repaired",
"repayment",
"repeates",
"replacer",
"reposition",
"rerouting",
"resizeable",
"resmgr",
"resourceschedule",
@ -652,6 +781,7 @@
"revocation",
"revoked",
"rewinding",
"reye",
"rfcomm",
"rfid",
"rfkill",
@ -677,21 +807,28 @@
"scene",
"sco",
"scrambling",
"screencapture",
"screenlock",
"screenoff",
"screensaver",
"scrolldown",
"scrollup",
"sdpi",
"sdr",
"searchsetter",
"sece",
"secinfo",
"securityguard",
"seeked",
"semicircles",
"sendable",
"sensing",
"sequenceable",
"setsockopt",
"settingsdata",
"seventh",
"sfactor",
"sgi",
"sha1",
"shadertype",
"sharedarraybuffer",
@ -701,6 +838,7 @@
"sigalgs",
"silenced",
"singly",
"skews",
"slidable",
"sliderstyle",
"statvfs",
@ -729,6 +867,8 @@
"spn",
"spooler",
"spp",
"spreadsheetml",
"springs",
"spry",
"spy",
"srgb",
@ -738,7 +878,10 @@
"stopcd",
"storei",
"storge",
"strikethrough",
"strm",
"stroked",
"stuffit",
"subassembies",
"subassemblies",
"subcomponents",
@ -750,6 +893,7 @@
"subscrbers",
"subscribale",
"subscribes",
"subsec",
"substate",
"subtitles",
"subtypes",
@ -760,6 +904,8 @@
"suscribes",
"suspends",
"switchvideomode",
"symantec",
"symbolglyph",
"synched",
"synchronizes",
"synchronizing",
@ -788,7 +934,9 @@
"textblob",
"textclock",
"texttimer",
"tga",
"thirdparty",
"throttled",
"timeinterfaceimpl",
"tlsv12",
"tlsv13",
@ -824,11 +972,15 @@
"unassigned",
"unauth",
"unbinding",
"unblock",
"unblocking",
"unbond",
"uncalibrated",
"uncategorized",
"uncatergorized",
"unchangeable",
"unclearable",
"uncompress",
"unconditional",
"undefer",
"undisturbed",
@ -836,6 +988,7 @@
"unducked",
"unequal",
"unfiltered",
"unfocusable",
"unfocused",
"unhealthy",
"unhold",
@ -843,6 +996,7 @@
"unicon",
"uniform1ui",
"uniforms",
"unimplemented",
"uninit",
"uninitialize",
"uninitializes",
@ -857,9 +1011,11 @@
"unmountable",
"unmounted",
"unmute",
"unmuted",
"unmutes",
"unobserve",
"unperceivable",
"unpremultiplied",
"unpressed",
"unregistered",
"unregistering",
@ -867,6 +1023,7 @@
"unremovable",
"unrendered",
"unrestricted",
"unrevoked",
"unsecure",
"unsent",
"unspec",
@ -880,11 +1037,13 @@
"userspace",
"usim",
"ussd",
"utd",
"utilized",
"utimes",
"uuids",
"uwb",
"uids",
"unpipe",
"v9",
"varyings",
"viewframe",
@ -892,6 +1051,7 @@
"vibrating",
"vlr",
"voicemail",
"voidpf",
"volte",
"volumemanager",
"vorbis",
@ -904,6 +1064,7 @@
"wantagent",
"wapi",
"wappush",
"warmup",
"watchers",
"waterflow",
"wcdma",
@ -921,18 +1082,22 @@
"wmp",
"wmv",
"wmx",
"wordprocessingml",
"wordprocessor",
"workscheduler",
"woy",
"wrappedvalue",
"writemask",
"writev",
"wukong",
"wvx",
"wwan",
"x25519",
"x509",
"xbitmap",
"xcomponent",
"xfer",
"xflags",
"xldpi",
"xoffset",
"xxldpi",
@ -945,17 +1110,42 @@
"zoffset",
"zoomin",
"zoomout",
"asr",
"aec",
"zoomreset",
"zooms",
"zpass",
"tones",
"commonevent",
"clouddata",
"unadjustable",
"unprepare",
"unchained",
"sandboxes",
"avscreencapture",
"sar",
"adapts",
"followx"
"followx",
"precomposited",
"refresher",
"irnss",
"beidou",
"qzss",
"glonass",
"sbas",
"uncertainty",
"geofences",
"gbk",
"ocsp",
"encipherment",
"reconfirmed",
"subresource",
"euc",
"ruleset",
"easylist",
"allowlist",
"disallowlist",
"adblock",
"enqueued"
]
}

View File

@ -430,7 +430,7 @@ export class TagValueCheck {
if (singleApi.getApiType() === ApiType.TYPE_ALIAS) {
const typeParams: ParamInfo[] = (singleApi as TypeAliasInfo).getParamInfos();
paramApiName = typeParams.length > paramIndex ? typeParams[paramIndex].getApiName() : '';
paramApiType.push(typeParams.length > paramIndex ? typeParams[paramIndex].getApiType() : '');
paramApiType = typeParams.length > paramIndex ? typeParams[paramIndex].getType() : [''];
} else {
const paramApiInfos: ParamInfo[] = (singleApi as MethodInfo).getParams();
paramApiName = paramApiInfos[paramIndex]?.getApiName();