Skip to content

Commit b8898c6

Browse files
committed
Update phs_style.yaml
1 parent faa130b commit b8898c6

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/phs_style.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,18 @@ jobs:
2828
- name: Install posit-dev/air
2929
uses: posit-dev/setup-air@63e80dedb6d275c94a3841e15e5ff8691e1ab237 # v1.0.0
3030

31-
- name: Include standard air.toml
31+
- name: Include standard air.toml (overwrite existing)
3232
run: |
33-
curl -o air.toml https://raw.githubusercontent.com/Public-Health-Scotland/actions/${{ github.action_ref }}/air.toml
33+
echo '[format]' > air.toml
34+
echo 'line-ending = "lf"' >> air.toml
3435
35-
- name: Format
36+
- name: Add air.toml to .Rbuildignore if it exists
37+
run: |
38+
if [ -f .Rbuildignore ]; then
39+
grep -qxF 'air.toml' .Rbuildignore || echo 'air.toml' >> .Rbuildignore
40+
fi
41+
42+
- name: Format using air
3643
run: air format .
3744

3845
- name: Commit and push changes

0 commit comments

Comments
 (0)