Skip to content

Commit 78cff38

Browse files
author
Mike Johnson
committed
ci: add lint workflow
Run lintr::lint_package() on push/PR (LINTR_ERROR_ON_LINT), gating against the committed .lintr policy. Green from the start (lint_package is clean).
1 parent 26dfc40 commit 78cff38

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/lint.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
name: lint.yaml
10+
11+
permissions: read-all
12+
13+
jobs:
14+
lint:
15+
runs-on: ubuntu-latest
16+
env:
17+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- uses: r-lib/actions/setup-r@v2
23+
with:
24+
use-public-rspm: true
25+
26+
- uses: r-lib/actions/setup-r-dependencies@v2
27+
with:
28+
extra-packages: any::lintr, local::.
29+
needs: lint
30+
31+
- name: Lint
32+
run: lintr::lint_package()
33+
shell: Rscript {0}
34+
env:
35+
LINTR_ERROR_ON_LINT: true

0 commit comments

Comments
 (0)