已关闭
[Bug-Report|缺陷反馈]: test_aclnn_add_example.cpp ends with redundant trailing blank lines (code style) #43
LiuZonggu创建于  11 天前关闭于  10 天前
LiuZonggu成员
11 天前 创建

Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.

Describe the current behavior / 问题描述 (Mandatory / 必填)

The file scripts/opgen/template/add_example/examples/test_aclnn_add_example.cpp ends with two redundant blank lines after the closing */ of the license header comment. This is a code style issue: a source file should end with a single trailing newline. Since this file belongs to the opgen add_example template, the redundant blank lines are also propagated to newly generated example files.

Environment / 环境信息 (Mandatory / 必填)

Not environment-specific. This is a code style issue in the opgen template sources, observable on the latest master branch.

Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)

  1. Open scripts/opgen/template/add_example/examples/test_aclnn_add_example.cpp on master.
  2. Check the end of the file, e.g. tail -n 5 scripts/opgen/template/add_example/examples/test_aclnn_add_example.cpp.
  3. Observe two extra blank lines after the closing */ of the license comment.

Describe the expected behavior / 预期结果 (Mandatory / 必填)

The file should end with the closing */ of the license comment followed by a single trailing newline, with no extra blank lines, in line with basic code style conventions.

  * See LICENSE in the root of the software repository for the full text of the License.
  */
-
-
\ No newline at end of file

Special notes for this issue/备注 (Optional / 选填)

A fix will be submitted via an associated PR.

likedislike
LLiuZonggu成员
11 天前 添加了label:bug-report
LLiuZonggu成员
11 天前 关联了pull request:fix: remove trailing blank lines at end of test_aclnn_add_example.cpp
LiuZonggu成员
11 天前 评论:

Fix submitted via PR: https://gitcode.com/cann/ops-ras/merge_requests/114 (branch LiuZonggu:fix/redundant-whitespace, removes the two redundant trailing blank lines).

likedislike
LLiuZonggu成员
11 天前 将 LiuZonggu 设为负责人
LLiuZonggu成员
11 天前 关联了pull request:fix: remove trailing blank lines at end of test_aclnn_add_example.cpp
LiuZonggu成员
11 天前 评论:

Also cherry-picked onto the 9.2.0 branch: https://gitcode.com/cann/ops-ras/merge_requests/115 (branch LiuZonggu:fix/redundant-whitespace-9.2.0, same whitespace cleanup).

likedislike
CANN-robotCANN-robot成员
10 天前 关闭了 issue
CANN-robotCANN-robot成员
10 天前 添加了label:resolved