!3567 调整syscap检查告警信息

Merge pull request !3567 from 王曹宇/bugfix_syscap_check
This commit is contained in:
openharmony_ci 2024-07-04 09:10:24 +00:00 committed by Gitee
commit 0ccf202788
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ export const SYSTEM_API_TAG_CHECK_WARNING: string = "'{0}' is system api";
export const TEST_TAG_CHECK_NAME: string = 'test';
export const TEST_TAG_CHECK_ERROR: string = "'{0}' can only be used for testing directories ";
export const SYSCAP_TAG_CHECK_NAME: string = 'syscap';
export const SYSCAP_TAG_CHECK_WARNING: string = "The default system capabilities of devices $DT do not include system capability of '{0}'. Configure the capabilities in syscap.json. It may cause your application crush in some devices. Attention: Such illegal interface call will lead to compilation error in the future version!";
export const SYSCAP_TAG_CHECK_WARNING: string = "The system capacity of this api '{0}' is not supported on all devices";
export const SYSCAP_TAG_CONDITION_CHECK_WARNING: string = 'The API is not supported on all devices. Use the canIUse condition to determine whether the API is supported.';
export const CANIUSE_FUNCTION_NAME: string = 'canIUse';
export const RUNTIME_OS_OH: string = 'OpenHarmony';

View File

@ -328,7 +328,7 @@ export function getJsDocNodeCheckConfig(fileName: string, sourceFileName: string
ts.DiagnosticCategory.Warning, '', false));
// TODO: the third param is to be opened
checkConfigArray.push(getJsDocNodeCheckConfigItem([SYSCAP_TAG_CHECK_NAME],
SYSCAP_TAG_CHECK_WARNING.replace('$DT', projectConfig.deviceTypesMessage), false, ts.DiagnosticCategory.Warning,
SYSCAP_TAG_CHECK_WARNING, false, ts.DiagnosticCategory.Warning,
CANIUSE_FUNCTION_NAME, false, undefined, checkSyscapAbility));
if (projectConfig.projectRootPath) {
const ohosTestDir = ts.sys.resolvePath(path.join(projectConfig.projectRootPath, 'entry', 'src', 'ohosTest'));