Closed
[Bug-Report|缺陷反馈]: add_example_aicpu test_aclnn_add_example.cpp ends with redundant trailing blank lines (code style) #46
LiuZongguAdd on  Sep 23Closed at  Sep 23
LiuZongguCollaborators
Sep 23 Create

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_aicpu/examples/test_aclnn_add_example.cpp ends with three 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_aicpu template, the redundant blank lines are also propagated to newly generated AICPU 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_aicpu/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_aicpu/examples/test_aclnn_add_example.cpp.
  3. Observe three 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 / 选填)

Same class of code style cleanup as issue #43 (which fixed the trailing blank lines in the add_example template). A fix will be submitted via associated PRs.

likedislike
LLiuZongguCollaborators
Sep 23 Added label: bug-report
LLiuZongguCollaborators
Sep 23 Associated pull request
LLiuZongguCollaborators
Sep 23 Associated pull request
LiuZongguCollaborators
Sep 23 Comments:

Fix submitted via PRs:

Both remove the three redundant trailing blank lines; whitespace-only change.

likedislike
CANN-robotCANN-robotCollaborators
Sep 23 Close issue
CANN-robotCANN-robotCollaborators
Sep 23 Added label: resolved