Skip to content

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Sep 16, 2025

The project's GitHub Actions workflows and tasks contain complex shell command lines.

Careful formatting of these commands improves readability by providing a visualization of the command structure. It also improves maintainability by making diffs for changes to these commands more clear.

The project's GitHub Actions workflows and tasks contain complex shell command lines.

With the use of the line continuation operator, these commands can be split into multiple code lines. This improves
readability by providing a visualization of the command structure. It also improves maintainability by making diffs for
changes to these commands more clear.

The readability can be further improved by indentation of the subsequent lines of the command in a manner that visually
conveys the structure.

Previously, in cases where multiple commands are chained via control or list operators, the subsequent commands were
indented relative to the prior command in the chain. Although this did help to visually convey the structure, it also
resulted in excessive levels of indentation. It also resulted in some visual ambiguity between indentation used for
arguments to a command, and that for subsequent commands in the chain. For these reasons, the determination was made to
not indent the subsequent commands in the chain. The structure is communicated by placing the operator linking the
commands on a dedicated line.
The project's GitHub Actions workflows and tasks contain complex shell command lines.

With the use of the line continuation operator, these commands can be split into multiple code lines. This improves
readability by providing a visualization of the command structure and avoiding excessive line lengths. It also improves
maintainability by making diffs for changes to these commands more clear.

Previously this was done in many commands, but not consistently throughout the project.
@per1234 per1234 self-assigned this Sep 16, 2025
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Sep 16, 2025
The `run` keys of the steps in the GitHub Actions workflows contain complex shell command lines.

The readability of this code is improved by selectively adding blank lines to separate it visually into logical
groupings.
@per1234 per1234 merged commit 83027a8 into arduino:main Sep 16, 2025
69 checks passed
@per1234 per1234 deleted the format-shell branch September 16, 2025 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant