[OS-BUILD PATCH 18/20] [redhat] ark-rebase-patches.sh: Fix for shellcheck

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ben Crocker <bcrocker@xxxxxxxxxx>

Changes actually consist of disabling shellcheck on a few lines:
• SC2086: Double quote to prevent globbing and word splitting.
• SC2059: Don't use variables in the printf format string. Use printf...

For the former, in the two gitlab commands involved,
GITLAB_CONFIG_OPT DEPENDS on work splitting.
For the latter, the ShellCheck wiki actually recommend disabling the warning
because a multi-line pattern is in use and there is no good rewrite.

Signed-off-by: Ben Crocker <bcrocker@xxxxxxxxxx>
---
 redhat/scripts/ci/ark-rebase-patches.sh | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/redhat/scripts/ci/ark-rebase-patches.sh b/redhat/scripts/ci/ark-rebase-patches.sh
index 2e64b90ac277..57877280b27b 100755
--- a/redhat/scripts/ci/ark-rebase-patches.sh
+++ b/redhat/scripts/ci/ark-rebase-patches.sh
@@ -34,8 +34,8 @@ To fix this issue:
 
 1. \`git rebase upstream ark-patches\`
 2. Use your soft, squishy brain to resolve the conflict as you see fit. If it is
-   non-trivial and has an \"Upstream Status: RHEL only\" tag, contact the author
-   and ask them to rebase the patch.
+   non-trivial and has an \"Upstream Status: RHEL only\" tag, ask the author
+   to rebase the patch.
 3. \`if git tag -v $UPSTREAM_REF; then git branch ark/patches/$UPSTREAM_REF && git push upstream ark/patches/$UPSTREAM_REF; fi\`
 4. \`git push -f upstream ark-patches\`
 "
@@ -72,13 +72,19 @@ elif [ -n "$REPORT_BUGS" ]; then
 		CONFLICT=$(git am --show-current-patch)
 		COMMIT=$(git am --show-current-patch | head -n1 | awk '{print $2}' | cut -c 1-12)
 		TITLE=$(printf "Unable to automatically rebase commit %s" "$COMMIT")
+		# shellcheck disable=SC2059     # There is a multi-line pattern in ISSUE_TEMPLATE;
+		# wiki says there is no good rewrite and recommends disabling warning.
 		DESC=$(printf "$ISSUE_TEMPLATE" "$COMMIT" "$CONFLICT")
+		# shellcheck disable=SC2086
+		# GITLAB_CONFIG_OPT DEPENDS on word splitting:
 		OPEN_ISSUES=$(gitlab $GITLAB_CONFIG_OPT project-issue list --project-id "$PROJECT_ID" --search "$TITLE")
 		if [ -n "$OPEN_ISSUES" ]; then
 			echo "Skipping filing an issue about commit $COMMIT; already exists as $OPEN_ISSUES"
 			continue
 		fi
 
+		# shellcheck disable=SC2086
+		# GITLAB_CONFIG_OPT DEPENDS on word splitting:
 		if gitlab $GITLAB_CONFIG_OPT project-issue create --project-id "$PROJECT_ID" \
 			--title "$TITLE" --description "$DESC" --labels "Patch Rebase"; then
 			if git rebase --skip; then
-- 
GitLab
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux