From 8faa23a876c7c92225cf2a956bf630f1bccb6814 Mon Sep 17 00:00:00 2001 From: chen0088 Date: Sat, 20 Jan 2024 16:44:54 +0800 Subject: [PATCH] modify codecheck Signed-off-by: chen0088 --- application/entry/hvigorfile.js | 7 +- .../entry/src/main/ets/utils/Logger.ts | 37 --------- application/hvigorfile.js | 7 +- application/hvigorw.bat | 78 ------------------- 4 files changed, 8 insertions(+), 121 deletions(-) delete mode 100644 application/entry/src/main/ets/utils/Logger.ts delete mode 100644 application/hvigorw.bat diff --git a/application/entry/hvigorfile.js b/application/entry/hvigorfile.js index 8fe78199..1c4ceb9e 100644 --- a/application/entry/hvigorfile.js +++ b/application/entry/hvigorfile.js @@ -12,9 +12,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { hapTasks } from '@ohos/hvigor-ohos-plugin'; export default { - system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ - plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ -} + system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ +}; diff --git a/application/entry/src/main/ets/utils/Logger.ts b/application/entry/src/main/ets/utils/Logger.ts deleted file mode 100644 index 183c76f7..00000000 --- a/application/entry/src/main/ets/utils/Logger.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import hilog from '@ohos.hilog'; - -export class Logger{ - static PREFIX: string = '[DHardware_UI]' - static DOMAIN: number = 0xFF00 - static FORMAT: string = '%{public}s' - - static debug(...args: any[]) { - hilog.debug(Logger.DOMAIN, Logger.PREFIX, Logger.FORMAT, args) - } - - static info(...args: any[]) { - hilog.info(Logger.DOMAIN, Logger.PREFIX, Logger.FORMAT, args) - } - - static warn(...args: any[]) { - hilog.warn(Logger.DOMAIN, Logger.PREFIX, Logger.FORMAT, args) - } - - static error(...args: any[]) { - hilog.error(Logger.DOMAIN, Logger.PREFIX, Logger.FORMAT, args) - } -} diff --git a/application/hvigorfile.js b/application/hvigorfile.js index 2e7b775e..8096108d 100644 --- a/application/hvigorfile.js +++ b/application/hvigorfile.js @@ -12,9 +12,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { appTasks } from '@ohos/hvigor-ohos-plugin'; export default { - system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ - plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ -} + system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ +}; diff --git a/application/hvigorw.bat b/application/hvigorw.bat deleted file mode 100644 index 1b68706a..00000000 --- a/application/hvigorw.bat +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Hvigor startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -set WRAPPER_MODULE_PATH=%APP_HOME%\hvigor\hvigor-wrapper.js -set NODE_EXE=node.exe - -goto start - -:start -@rem Find node.exe -if defined NODE_HOME goto findNodeFromNodeHome - -%NODE_EXE% --version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH. -echo. -echo Please set the NODE_HOME variable in your environment to match the -echo location of your NodeJs installation. - -goto fail - -:findNodeFromNodeHome -set NODE_HOME=%NODE_HOME:"=% -set NODE_EXE_PATH=%NODE_HOME%/%NODE_EXE% - -if exist "%NODE_EXE_PATH%" goto execute -echo. -echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH. -echo. -echo Please set the NODE_HOME variable in your environment to match the -echo location of your NodeJs installation. - -goto fail - -:execute -@rem Execute hvigor -"%NODE_EXE%" "%WRAPPER_MODULE_PATH%" %* - -if "%ERRORLEVEL%" == "0" goto hvigorwEnd - -:fail -exit /b 1 - -:hvigorwEnd -if "%OS%" == "Windows_NT" endlocal - -:end