Commit 875daee
committed
Add pre-commit hooks and CI lint job
Adds .pre-commit-config.yaml with standard hooks (check-json,
check-yaml, check-executables-have-shebangs, check-shebang-scripts-are-
executable, end-of-file-fixer, trailing-whitespace, pretty-format-json,
shellcheck, 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`. Hook
versions updated via pre-commit autoupdate.
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 (templates
compose shebangs from Jinja2 macros)
- 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.1 parent f304bb1 commit 875daee
30 files changed
Lines changed: 158 additions & 97 deletions
File tree
- .github
- workflows
- workbench
- 2025.09
- conf
- positron
- vscode
- deps
- scripts
- test
- 2026.01
- conf
- positron
- vscode
- deps
- scripts
- test
- template
- conf
- positron
- vscode
- deps
- scripts
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
47 | 65 | | |
48 | 66 | | |
49 | 67 | | |
| |||
79 | 97 | | |
80 | 98 | | |
81 | 99 | | |
82 | | - | |
| 100 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
155 | 161 | | |
156 | 162 | | |
157 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
3 | 7 | | |
4 | 8 | | |
5 | 9 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | 2 | | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
0 commit comments