Draft
Conversation
3 tasks
4560fb8 to
875daee
Compare
Adds .pre-commit-config.yaml with standard hooks (check-json, check-merge-conflict, check-yaml, check-executables-have-shebangs, check-shebang-scripts-are-executable, end-of-file-fixer, trailing- whitespace, pretty-format-json, shellcheck, actionlint, etc.) and an inline `lint` job in production.yml gated by the `ci` meta-job's `needs:`. Lint job uses SHA-pinned actions (checkout@v6.0.2, setup-python@v5.6.0, pre-commit/action@v3.0.1) with `permissions: contents: read` and `persist-credentials: false`. Template and rendered-file changes to make pre-commit pass: - Mark shell-script Jinja2 templates (*.sh.jinja2) executable so rendered scripts inherit the exec bit via bakery's template-mode propagation (posit-dev/images-shared#469) - Mark justfile executable + add a `setup` recipe to install hooks - Add `# shellcheck disable=SC2045`, `# shellcheck disable=SC2046`, and quoted variables across startup.sh.jinja2 and install_workbench.sh.jinja2 - Strip leading whitespace from `{% for %}`/`{% endfor %}`/`{% raw %}` blocks in goss.yaml template so rendered output doesn't regress into trailing whitespace on re-render - Drop `.jinja2` suffix from vscode-user-settings.json.jinja2 (no Jinja2 syntax; matches positron-user-settings.json convention); reformat to 2-space indent with alphabetized keys so pretty-format-json passes - Exclude *.sh.jinja2 from check-executables-have-shebangs - Exclude .claude/settings.json from pretty-format-json README: add `pre-commit` bullet to the Prerequisites list pointing contributors at `just setup`. Various trailing-newline and trailing-whitespace fixes across rendered and non-rendered files surfaced by the new hooks.
875daee to
e1e7bd3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.pre-commit-config.yamlwith standard hookslintjob toproduction.ymlwith SHA-pinned actions andpermissions: contents: read, gated by thecimeta-job'sneeds:.jinja2suffix fromvscode-user-settings.json.jinja2— the file had no Jinja2 syntax at all, matching the convention of its siblingpositron-user-settings.jsonpretty-format-jsonpassesjustfileexecutable + adds asetuprecipecheck-executables-have-shebangsexcludes*.sh.jinja2pretty-format-jsonexcludes.claude/settings.jsonMerge dependency
Depends on posit-dev/images-shared#469 for bakery's template-mode propagation.
Test plan
pre-commit run --all-filespasses locally on this branchlintjob in CI passes on this PR