From 0bc015418bab0d46bd875e3608a19e62c9d618fe Mon Sep 17 00:00:00 2001 From: jiangkaiwen Date: Fri, 23 Sep 2022 12:47:44 +0800 Subject: [PATCH] Fix codecheck warnings of the master branch 1. The length of one line of code shall not exceed 120 characters 2. Header file comments Issue:I5SPU9 Signed-off-by: jiangkaiwen Change-Id: I90211b725e30c4a8e2a657e25a13e339abaf6721 --- es2panda/typescript/core/helpers.cpp | 2 +- es2panda/util/base64.h | 2 +- es2panda/util/bitset.h | 2 +- es2panda/util/enumbitops.h | 2 +- es2panda/util/helpers.cpp | 2 +- es2panda/util/helpers.h | 2 +- es2panda/util/hotfix.cpp | 5 +++-- es2panda/util/hotfix.h | 2 +- es2panda/util/moduleHelpers.cpp | 2 +- es2panda/util/moduleHelpers.h | 2 +- es2panda/util/programCache.h | 2 +- es2panda/util/symbolTable.cpp | 2 +- es2panda/util/symbolTable.h | 2 +- es2panda/util/ustring.h | 2 +- test262/run_sunspider.py | 3 ++- test262/utils.py | 3 ++- 16 files changed, 20 insertions(+), 17 deletions(-) diff --git a/es2panda/typescript/core/helpers.cpp b/es2panda/typescript/core/helpers.cpp index b09b499e85..18a876b0a4 100644 --- a/es2panda/typescript/core/helpers.cpp +++ b/es2panda/typescript/core/helpers.cpp @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2021 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. diff --git a/es2panda/util/base64.h b/es2panda/util/base64.h index 239a6dff9e..400d5d9946 100644 --- a/es2panda/util/base64.h +++ b/es2panda/util/base64.h @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2022 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. diff --git a/es2panda/util/bitset.h b/es2panda/util/bitset.h index ad621e04c8..433f9a404e 100644 --- a/es2panda/util/bitset.h +++ b/es2panda/util/bitset.h @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2021-2022 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. diff --git a/es2panda/util/enumbitops.h b/es2panda/util/enumbitops.h index f42426cda4..73fb3eda22 100644 --- a/es2panda/util/enumbitops.h +++ b/es2panda/util/enumbitops.h @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2021-2022 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. diff --git a/es2panda/util/helpers.cpp b/es2panda/util/helpers.cpp index 10c598c476..afe9ed62ab 100644 --- a/es2panda/util/helpers.cpp +++ b/es2panda/util/helpers.cpp @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2021 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. diff --git a/es2panda/util/helpers.h b/es2panda/util/helpers.h index d9021aa9e2..77c8b069e0 100644 --- a/es2panda/util/helpers.h +++ b/es2panda/util/helpers.h @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2021 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. diff --git a/es2panda/util/hotfix.cpp b/es2panda/util/hotfix.cpp index 1994170652..0c50e58422 100644 --- a/es2panda/util/hotfix.cpp +++ b/es2panda/util/hotfix.cpp @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2022 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. @@ -432,7 +432,8 @@ void Hotfix::HandleFunction(const compiler::PandaGen *pg, panda::pandasm::Functi auto originFunction = originFunctionInfo_->find(funcName); if (originFunction == originFunctionInfo_->end()) { if (IsAnonymousOrDuplicateNameFunction(funcName)) { - std::cerr << "Found new anonymous or duplicate name function " << funcName << " not supported!" << std::endl; + std::cerr << "Found new anonymous or duplicate name function " << funcName + << " not supported!" << std::endl; patchError_ = true; return; } diff --git a/es2panda/util/hotfix.h b/es2panda/util/hotfix.h index 53bf7a043e..004d98b10c 100644 --- a/es2panda/util/hotfix.h +++ b/es2panda/util/hotfix.h @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2022 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. diff --git a/es2panda/util/moduleHelpers.cpp b/es2panda/util/moduleHelpers.cpp index 53841408ee..69174c9e67 100644 --- a/es2panda/util/moduleHelpers.cpp +++ b/es2panda/util/moduleHelpers.cpp @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2021 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. diff --git a/es2panda/util/moduleHelpers.h b/es2panda/util/moduleHelpers.h index 3c0a68e918..f7952e705d 100644 --- a/es2panda/util/moduleHelpers.h +++ b/es2panda/util/moduleHelpers.h @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2022 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. diff --git a/es2panda/util/programCache.h b/es2panda/util/programCache.h index f0512342e2..24f71ae7d6 100644 --- a/es2panda/util/programCache.h +++ b/es2panda/util/programCache.h @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2022 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. diff --git a/es2panda/util/symbolTable.cpp b/es2panda/util/symbolTable.cpp index 000f1a9c19..2b31ca0c8b 100644 --- a/es2panda/util/symbolTable.cpp +++ b/es2panda/util/symbolTable.cpp @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2022 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. diff --git a/es2panda/util/symbolTable.h b/es2panda/util/symbolTable.h index 892a31ad4e..884ad13177 100644 --- a/es2panda/util/symbolTable.h +++ b/es2panda/util/symbolTable.h @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2022 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. diff --git a/es2panda/util/ustring.h b/es2panda/util/ustring.h index 4114601087..b984080037 100644 --- a/es2panda/util/ustring.h +++ b/es2panda/util/ustring.h @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2021 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. diff --git a/test262/run_sunspider.py b/test262/run_sunspider.py index f7f6ea757a..0a06caa4bd 100755 --- a/test262/run_sunspider.py +++ b/test262/run_sunspider.py @@ -254,7 +254,8 @@ class ArkProgram(): # pre-generate the dependencies' abc when ark_frontend is [es2panda] if (file_name in self.module_list or file_name in self.dynamicImport_list) and \ self.ark_frontend == ARK_FRONTEND_LIST[1]: - search_dir = "language/module-code" if file_name in self.module_list else "language/expressions/dynamic-import" + search_dir = "language/module-code" if file_name in self.module_list \ + else "language/expressions/dynamic-import" dependencies = collect_module_dependencies(js_file, os.path.join(TEST_FULL_DIR, search_dir), []) for dependency in list(set(dependencies)): self.gen_dependency_abc(dependency) diff --git a/test262/utils.py b/test262/utils.py index 6fba9bbf9c..6d38ded768 100755 --- a/test262/utils.py +++ b/test262/utils.py @@ -179,7 +179,8 @@ def collect_module_dependencies(file, directory, traversedDependencies): if re.search(r'\S+_FIXTURE.js$', specifier): dependency = search_dependency(specifier.lstrip('./'), directory) if dependency not in traversedDependencies: - dependencies.extend(collect_module_dependencies(dependency, directory, list(set(traversedDependencies)))) + dependencies.extend(collect_module_dependencies(dependency, directory, + list(set(traversedDependencies)))) dependencies.append(dependency) return dependencies -- Gitee