Skip to content

Commit 3ccc47a

Browse files
Merge pull request #64 from StrangeRanger/dev
Modify 'Characters Per Line' guidelines from 88 to 92
2 parents aef3168 + c751657 commit 3ccc47a

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

CHANGELOG.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
## [Unreleased]
88

9+
## [2025.7.15] - 2025-07-15
10+
11+
### Changed
12+
13+
- **Guidelines**: Modify the maximum CPL (Characters Per Line) from 88 to 92.
14+
- `Aesthetics -> Characters Per Line`
15+
916
## [2025.3.7] - 2025-03-07
1017

11-
## Changed
18+
### Changed
1219

1320
- Update the wording of the guidelines and additional text.
1421
- Improve the format and wording of the TODO list.
@@ -126,7 +133,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
126133

127134
N/A
128135

129-
[unreleased]: https://github.com/StrangeRanger/bash-style-guide/compare/2025.3.7...HEAD
136+
[unreleased]: https://github.com/StrangeRanger/bash-style-guide/compare/2025.7.15...HEAD
137+
[2025.7.15]: https://github.com/StrangeRanger/bash-style-guide/releases/tag/2025.7.15
130138
[2025.3.7]: https://github.com/StrangeRanger/bash-style-guide/releases/tag/2025.3.7
131139
[2024.12.15]: https://github.com/StrangeRanger/bash-style-guide/releases/tag/2024.12.15
132140
[2024.12.4]: https://github.com/StrangeRanger/bash-style-guide/releases/tag/2024.12.4

docs/guidelines/aesthetics.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ In the past, the maximum number of characters per line (CPL) was limited to 80 b
2727
/// admonition | General Guidelines
2828
type: info
2929

30-
- **CPL Limit**: Set a maximum CPL of <u>88 characters</u>.
31-
- **Reason**: An 88-character limit balances the historical 80-character standard and the need for more descriptive code. It accommodates longer variable names, comments, and strings without sacrificing readability.
30+
- **CPL Limit**: Set a maximum CPL of <u>92 characters</u>.
31+
- **Reason**: An 92-character limit balances the historical 80-character standard and the need for more descriptive code. It accommodates longer variable names, comments, and strings without sacrificing readability.
3232
- **Exceptions**: The CPL limit may be exceeded if line splitting _significantly_ reduces readability or negatively impacts the script's structure.
3333

3434
///
@@ -122,7 +122,7 @@ mkdir -p /path/to/backup \
122122
//// tab | Piping Operators
123123

124124
- **Placement**: Similar to logical operators, when a piped command sequence exceeds the CPL limit, place each pipe (`|`) at the start of a new line with the preceding command (`| command`).
125-
- **Single-Line Placement**: If piped commands fit within the 88-character limit, they may remain on the same line. Use this sparingly to avoid creating complex or hard-to-read sequences.
125+
- **Single-Line Placement**: If piped commands fit within the 92-character limit, they may remain on the same line. Use this sparingly to avoid creating complex or hard-to-read sequences.
126126

127127
///// details | Examples
128128
type: example
@@ -223,7 +223,7 @@ fi
223223
- **Reason**: This format is best suited for simple conditions or loops that can be expressed succinctly.
224224
- **Avoid Complex Logic**: Avoid adding multiple commands or complex logic to single-line structures.
225225
- **Reason**: Including complex logic or multiple commands on a single line can reduce readability and make the code harder to maintain.
226-
- **Character Limit**: <mark>**_DO NOT_**</mark> use a single-line control structure if it exceeds the 88-character limit.
226+
- **Character Limit**: <mark>**_DO NOT_**</mark> use a single-line control structure if it exceeds the 92-character limit.
227227
228228
///// details | Example
229229
type: example
@@ -572,10 +572,10 @@ done
572572
- **Subsections**: Quadruple-pound signs can also indicate subsections within a larger script section. However, this should be done **VERY** sparingly. Consider using [triple-pound signs](#__tabbed_4_4) (`###`) before resorting to quadruple-pound signs for subsections.
573573
- **Formatting**: Quadruple-pound sign comments should be formatted to ensure the transition between sections is clear and visually distinct. Below are the recommended formatting guidelines:
574574
- **Section Naming**: Append `[ section_name ]` to the end of `####`, replacing `section_name` with a descriptive title for that section. The section name should clearly indicate the content or purpose of that section.
575-
- **Filler Characters**: After the section name, append a series of `#` characters to fill the remaining space up to the 88-character limit.
575+
- **Filler Characters**: After the section name, append a series of `#` characters to fill the remaining space up to the 92-character limit.
576576
- **Section Comments**: If necessary, add comments directly below the initial `####` line, prefixing them with four `#` characters.
577577
- **Spacing**: As mentioned in the [vertical spacing guidelines](#vertical-spacing), provide two blank lines before and after the quadruple-pound signs to enhance the visual separation between sections.
578-
- **Subsection Format**: Subsections should follow the same format, with the number of brackets (`[]`) indicating the depth of the subsection within the script. The deeper the subsection, the more brackets should be used. Use filler characters to maintain a consistent 88-character width.
578+
- **Subsection Format**: Subsections should follow the same format, with the number of brackets (`[]`) indicating the depth of the subsection within the script. The deeper the subsection, the more brackets should be used. Use filler characters to maintain a consistent 92-character width.
579579

580580
///// details | Example
581581
type: example
@@ -625,7 +625,7 @@ process_files "input.txt" "log.txt"
625625
- **Usage**: Use three pound signs where the code is different enough to warrant distinction but not significant enough to be placed in an entirely new section.
626626
- **Formatting**: Triple-pound sign comments should be formatted to ensure the transition between differing blocks of code is clear and visually distinct. Below are the recommended formatting guidelines:
627627
- **Section Naming**: Append `[ section_name ]` to the end of `###`, replacing `section_name` with a descriptive title for that section. The section name should clearly indicate the content or purpose of the code below it.
628-
- **Filler Characters**: After the section name, append a series of `#` characters to fill the remaining space up to the 88-character limit. Additionally, place three `#` characters above and below the section name line.
628+
- **Filler Characters**: After the section name, append a series of `#` characters to fill the remaining space up to the 92-character limit. Additionally, place three `#` characters above and below the section name line.
629629
- **Spacing**: Include a single blank line above and below the filler characters to separate the previous command(s), the triple pound sign comment, and the next command(s).
630630
- **Section Comments**: If necessary, add comments to describe the section's content or purpose, prefixed with three `#` characters.
631631

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "bash-style-guide"
3-
version = "2025.3.7"
3+
version = "2025.7.15"
44
requires-python = "~=3.12"
55
dependencies = [
66
"mkdocs-git-revision-date-localized-plugin==1.4.7",

0 commit comments

Comments
 (0)