Skip to content

Commit 7966727

Browse files
committed
build: do not include line if null
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: passed - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 9452b23 commit 7966727

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: .github/workflows/scripts/create_address_commit_comments_issues

+6-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# GITHUB_TOKEN GitHub token for authentication.
3030
#
3131

32-
# shellcheck disable=SC2153
32+
# shellcheck disable=SC2153,SC2155
3333

3434
# Ensure that the exit status of pipelines is non-zero in the event that at least one
3535
# of the commands in a pipeline fails:
@@ -253,7 +253,11 @@ update_commit_map() {
253253
for existing in "${commit_keys[@]}"; do
254254
if [ "$existing" = "$key" ]; then
255255
commit_counts[i]=$(( commit_counts[i] + 1 ))
256-
commit_comments[i]="${commit_comments[i]}"$'\n\n'"- ${link}"$'\n\n'" > **Line ${line}**: ${formatted_body}"$'\n\n'" ${code_snippet}"
256+
if [ "$line" = "null" ]; then
257+
commit_comments[i]="${commit_comments[i]}"$'\n\n'"- ${link}"$'\n\n'" > ${formatted_body}"$'\n\n'" ${code_snippet}"
258+
else
259+
commit_comments[i]="${commit_comments[i]}"$'\n\n'"- ${link}"$'\n\n'" > **Line ${line}**: ${formatted_body}"$'\n\n'" ${code_snippet}"
260+
fi
257261
found=1
258262
break
259263
fi

0 commit comments

Comments
 (0)