Declare and assign variable separately in Shell Script
What does this MR do?
This MR improves the consistency and maintainability, robustness of shell scripts in GitLab projects, make the scripts following the Shell scripting standards and style guidelines step by step.
This was originally something doing in gitlab-foss!31014 (comment 225759258), as @rpaik asked here(gitlab-foss!31014 (comment 225759258)), I'd like to continue shell script refactoring, but I can't comment there, so directly send another MR in the new repository, and separate different items into different MR, to minimize the effort on resolving conflicts.
Does this MR meet the acceptance criteria?
Conformity
Merge request reports
Activity
added 1 commit
- 13976cda - Declare and assign variable separately in Shell Script
marked the checklist item Changelog entry as completed
added Community contribution label
mentioned in issue gitlab-org/quality/triage-reports#645 (closed)
added groupecosystem [DEPRECATED] label
- Resolved by Vitali Tatarintev
@ck3g Please also have a look at this one, it's closely related to !46122 (merged).
assigned to @ck3g
For those who are (like me) curious about what improvement does this change brings, it's a suggestion from the Shell Style Guide:
Declare function-specific variables with local. Declaration and assignment should be on different lines
More info here: https://google.github.io/styleguide/shellguide.html#s7.6-use-local-variables
enabled an automatic merge when the pipeline for 423cff23 succeeds
added backend label
1 Warning This merge request does not refer to an existing milestone. Reviewer roulette
Changes that require review have been detected! A merge request is normally reviewed by both a reviewer and a maintainer in its primary category (e.g. frontend or backend), and by a maintainer in all other categories.
To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited, or the chosen person is unavailable.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, mention them as you normally would! Danger does not automatically notify them for you.
Category Reviewer Maintainer backend Mario de la Ossa ( @mdelaossa
) (UTC-6)Kerri Miller ( @kerrizor
) (UTC-7)If needed, you can retry the
danger-review
job that generated this comment.Generated by
Dangermentioned in commit 8af3babf
added workflowstaging label
added workflowcanary label and removed workflowstaging label
changed milestone to %13.6
added workflowproduction label and removed workflowcanary label
added releasedcandidate label
added releasedpublished label and removed releasedcandidate label
added devopsmanage label and removed 1 deleted label