From 67fbbf33edfb7befa1ad657d4024a16f0ef7298f Mon Sep 17 00:00:00 2001 From: luobohua Date: Wed, 3 Sep 2025 21:42:52 +0800 Subject: [PATCH] add warning log to output path Issue: https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/ICW8VI Change-Id: I27e8d6f3d1788031e237804f930eddb855bac77b Signed-off-by: luobohua --- ets2panda/util/diagnostic/warning.yaml | 8 ++++++++ ets2panda/util/options.cpp | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ets2panda/util/diagnostic/warning.yaml b/ets2panda/util/diagnostic/warning.yaml index dcb80bf69a..06c103a4c8 100644 --- a/ets2panda/util/diagnostic/warning.yaml +++ b/ets2panda/util/diagnostic/warning.yaml @@ -24,6 +24,14 @@ warning: - name: BOOST_EQUALITY_STATEMENT id: 4 message: "Boost Equality Statement. Change sides of binary expression." + +- name: CLI_OUTPUT_OPTION + id: 177420 + message: "The output path is set with cli --output argument '{}' instead of outDir in arktsconfig.json file." + +- name: DEFAULT_OUTPUT + id: 33177 + message: "Without cli --output argument, the output path is set with outDir in arktsconfig.json file '{}'." - name: DUPLICATE_EXPORT_ALIASES id: 73 diff --git a/ets2panda/util/options.cpp b/ets2panda/util/options.cpp index dbb5e1fbee..aa0b154943 100644 --- a/ets2panda/util/options.cpp +++ b/ets2panda/util/options.cpp @@ -191,7 +191,8 @@ bool Options::ParseInputOutput() return false; } } else { - SetOutput(ark::os::RemoveExtension(BaseName(SourceFileName())).append(".abc")); + std::string defaultOutput = ark::os::RemoveExtension(BaseName(SourceFileName())).append(".abc"); + SetOutput(defaultOutput); } return true; -- Gitee