Skip to content

Commit 19c8af5

Browse files
committed
build: Add a GHA Linter
1 parent fa857d6 commit 19c8af5

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

.Rbuildignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
.git
55
.github
66
misc
7+
^\.github$

.github/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/lint-project.yaml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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]
6+
pull_request:
7+
8+
name: lint-project.yaml
9+
10+
permissions: read-all
11+
12+
jobs:
13+
lint-project:
14+
runs-on: ubuntu-latest
15+
env:
16+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: r-lib/actions/setup-r@v2
21+
with:
22+
use-public-rspm: true
23+
24+
- name: Install lintr
25+
run: install.packages("lintr")
26+
shell: Rscript {0}
27+
28+
- name: Lint root directory
29+
run: lintr::lint_dir()
30+
shell: Rscript {0}
31+
env:
32+
LINTR_ERROR_ON_LINT: true

0 commit comments

Comments
 (0)