Repository navigation
style: clear lint debt before the lint CI lands - #204
Conversation
Clear the lint debt the standard lint CI would report, mechanically and with no behaviour change, before the callers land (stacked PR on top): - Add the central lint configs from DevSecNinja/.github config-sync/files at v4.2.0, unchanged: dprint.json, .yamllint.yaml, .yamlfmt.yaml and .editorconfig (4-space shell indentation, which the scripts already use). The repo's own .yamllint still takes precedence for yamllint. - dprint: Markdown formatting. - yamlfmt: document start markers, block lists, and `|-`/`>-` on a file's last block scalar (drops one trailing newline of a debug message). Every reformatted file parses to the same data otherwise. - shfmt: indentation in three scripts; shellcheck SC2086: quote $EXIT_CODE in tests/bash/run-tests.sh. Refs #203
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the shared lint configuration and formatting cleanup.
No open issues 🎉
What changed in this PR
Prepares the Ansible Pull infrastructure repository for the lint CI in #205, supporting #203, by adding shared configuration and clearing formatting debt.
Changes:
- Adds central dprint, yamlfmt, yamllint, and EditorConfig settings.
- Reformats Markdown and YAML, including block-style lists and trailing-newline trimming in debug messages.
- Normalizes shell formatting and quotes
$EXIT_CODEin the test runner.
| File | Description |
|---|---|
tests/bash/run-tests.sh |
Normalizes indentation and quotes exit-code references. |
tests/bash/README.md |
Adds Markdown spacing around lists. |
Taskfile.yml |
Adds a YAML document marker and reflows commands. |
README.md |
Formats the command table and Markdown spacing. |
INSTALL.md |
Adds spacing before a list. |
dprint.json |
Adds shared Markdown formatter settings and exclusions. |
docs/tools/MISE.md |
Adds spacing before a list. |
ansible/scripts/ansible-pull.sh |
Normalizes shell redirection spacing. |
ansible/roles/ufw/defaults/main.yml |
Normalizes inline-comment spacing. |
ansible/roles/system_setup/tasks/main.yml |
Converts task tags to block lists. |
ansible/roles/system_setup/handlers/main.yml |
Converts handler tags to block lists. |
ansible/roles/packages/tasks/main.yml |
Converts task tags to block lists. |
ansible/roles/package_managers/tasks/main.yml |
Converts task tags to block lists. |
ansible/roles/package_managers/tasks/install_mise.yml |
Converts task tags to block lists. |
ansible/roles/package_managers/tasks/install_homebrew.yml |
Converts task tags to block lists. |
ansible/roles/maintenance/tasks/main.yml |
Strips the final newline from a debug message. |
ansible/roles/maintenance/tasks/docker_maintenance.yml |
Strips the final newline from a debug message. |
ansible/roles/github_ssh_keys/tasks/main.yml |
Formats accepted HTTP statuses as a block list. |
ansible/roles/git_repos/tasks/main.yml |
Formats tags and consolidates a loop expression. |
ansible/roles/git_repos/tasks/github_user.yml |
Converts task tags to block lists. |
ansible/roles/git_repos/tasks/clone_shim.yml |
Formats tags and inline lint-suppression comments. |
ansible/roles/devcontainer_prebuild/tasks/main.yml |
Converts task tags to block lists. |
ansible/roles/cron_jobs/tasks/main.yml |
Converts task tags to block lists. |
ansible/roles/chezmoi/tasks/main.yml |
Wraps the ARM64 download URL expression. |
ansible/roles/apt_hold/tasks/unhold.yml |
Converts task tags to a block list. |
ansible/roles/apt_hold/tasks/main.yml |
Converts task tags to a block list. |
ansible/roles/ansible_pull_setup/tasks/main.yml |
Strips the final newline from a debug message. |
ansible/roles/ansible_pull_setup/defaults/main.yml |
Normalizes inline-comment spacing. |
ansible/README.md |
Adds Markdown spacing around headings and lists. |
ansible/playbooks/main.yml |
Converts role tags to block lists. |
.yamllint.yaml |
Adds central YAML lint rules and exclusions. |
.yamlfmt.yaml |
Adds central YAML formatting settings and exclusions. |
.github/copilot-instructions.md |
Formats Markdown without changing instruction content. |
.editorconfig |
Defines shared whitespace, indentation, and newline settings. |
.devcontainer/README.md |
Adds Markdown spacing before lists. |
.devcontainer/post-create.sh |
Normalizes shell indentation and comment alignment. |
Review effort: Balanced
Clears the lint debt that the standard lint CI would report, so the caller PR stacked on top (#205) is green from its first run. All changes are mechanical, with no behaviour change.
config-sync/filesat v4.2.0, unchanged, so config-sync later finds no drift:dprint.json,.yamllint.yaml,.yamlfmt.yamland.editorconfig..editorconfigsets 4-space indentation for shell scripts, which most of them already use. The repo's own.yamllintstill takes precedence for yamllint.|/>becomes|-/>-, which drops one trailing newline from adebugmessage;$EXIT_CODEintests/bash/run-tests.sh.Opened by repo-steward (lint rollout batch B2). Review and merge this first, then #205.
Refs #203
Summary by CodeRabbit