style: apply STYLE.md to all files

Give every file a header (title, empty line, explanation), wrap comments
at 80 columns and keep them to the why. Only comments change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Job79andClaude Opus 5.5 committed 2026-11-16 20:14:06 +01:00
1 parent efb282bf7d
commit a1fc65ed21
32 files changed
+191 -113

No files matched your search

+3 -16
View File
@@ -1,9 +1,5 @@
# Style guide
For everyone who changes this repository, people and AI agents alike.
## General
- Keep it simple. Prefer fewer files, fewer lines and the defaults. Delete what isn't needed.
- Each fact lives in one place. Elsewhere, refer to it by path instead of repeating it.
- Write plain English in short sentences.
@@ -16,7 +12,8 @@ Every file that allows comments starts with a header. It goes after the shebang,
#!/bin/sh
# Image version
#
# The build time (UTC), so every build is newer than the last.
# Prints the build time in UTC (YYYYMMDDhhmm). Every build gets a higher version than the one
# before, which is how systemd-sysupdate tells that an update is newer.
```
- Line 1 is a title: a few words, in sentence case, with no full stop.
@@ -30,14 +27,4 @@ them or in the README.
- Explain why, not what. Leave out comments that only repeat the code.
- Put a comment right above the line or block it is about.
- Wrap comments at 100 columns.
## Shell
- Use `#!/bin/sh` with `set -eu`. Switch to `#!/bin/bash` with `set -euo pipefail` only when the
script needs bash.
- Quote variables: `"$var"`.
## Config files
- Put one value per line in lists, with a comment explaining the less obvious entries.
- Wrap comments at 80 columns.