Skip to content

Commit bed991d

Browse files
signekbpre-commit-ci[bot]lwjohnst86
authored
build: 🔨 add rumdl Markdown formatter (#204)
# Description This PR adds the formatter to pre-commit and the justfile with a config file copied from [template-python-package](seedcase-project/template-python-package#239) Needs a thorough review. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Luke W. Johnston <lwjohnst86@users.noreply.github.com> Co-authored-by: Luke W. Johnston <lwjohnst@gmail.com>
1 parent c2ae859 commit bed991d

10 files changed

Lines changed: 81 additions & 35 deletions

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
^\.editorconfig$
2323
^\.pre-commit-config\.yaml$
2424
^\.typos\.toml$
25+
^\.rumdl\.toml$
2526
^_targets\.R$
2627
^cran-comments\.md$

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,8 @@ repos:
2828
rev: v1.43.4
2929
hooks:
3030
- id: typos
31+
32+
- repo: https://github.com/rvben/rumdl-pre-commit
33+
rev: v0.1.18
34+
hooks:
35+
- id: rumdl-fmt # Auto-format

.rumdl.toml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[global]
2+
# 72 to match what we have currently been using
3+
line_length = 72
4+
flavor = "quarto"
5+
exclude = [
6+
# Common directories to exclude
7+
".github",
8+
# This is auto-generated from the qmd version
9+
"**/README.md",
10+
# This has it's own structure
11+
"**/LICENSE.md",
12+
"**/cran-comments.md"
13+
]
14+
15+
# List style: `-`
16+
[MD004]
17+
style = "dash"
18+
19+
# Wrap list items
20+
[MD032]
21+
allow-lazy-continuation = false
22+
23+
# Reflow text
24+
[MD013]
25+
reflow = true
26+
reflow-mode = "normalize"
27+
28+
# Fix tables and their separator row
29+
[MD060]
30+
enabled = true
31+
style = "aligned-no-space"

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"vivaxy.vscode-conventional-commits",
66
"pshaddel.conventional-branch",
77
"Posit.air-vscode",
8-
"tekumara.typos-vscode"
8+
"tekumara.typos-vscode",
9+
"rvben.rumdl"
910
],
1011
"unwantedRecommendations": []
1112
}

.vscode/settings.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
"editor.tabSize": 2,
44
"editor.wordWrap": "off",
55
"git.autofetch": false,
6-
"quarto.visualEditor.markdownWrap": "column",
7-
"quarto.visualEditor.markdownWrapColumn": 72,
86
"editor.tabCompletion": "on",
97
"editor.snippetSuggestions": "inline",
108
"conventional-branch.type": [

CODE_OF_CONDUCT.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,24 @@ welcoming, diverse, inclusive, and healthy community.
1717
Examples of behavior that contributes to a positive environment for our
1818
community include:
1919

20-
- Demonstrating empathy and kindness toward other people
21-
- Being respectful of differing opinions, viewpoints, and experiences
22-
- Giving and gracefully accepting constructive feedback
23-
- Accepting responsibility and apologizing to those affected by our
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our
2424
mistakes, and learning from the experience
25-
- Focusing on what is best not just for us as individuals, but for the
25+
- Focusing on what is best not just for us as individuals, but for the
2626
overall community
2727

2828
Examples of unacceptable behavior include:
2929

30-
- The use of sexualized language or imagery, and sexual attention or
30+
- The use of sexualized language or imagery, and sexual attention or
3131
advances of any kind
32-
- Trolling, insulting or derogatory comments, and personal or
32+
- Trolling, insulting or derogatory comments, and personal or
3333
political attacks
34-
- Public or private harassment
35-
- Publishing others' private information, such as a physical or email
34+
- Public or private harassment
35+
- Publishing others' private information, such as a physical or email
3636
address, without their explicit permission
37-
- Other conduct which could reasonably be considered inappropriate in
37+
- Other conduct which could reasonably be considered inappropriate in
3838
a professional setting
3939

4040
## Enforcement Responsibilities
@@ -119,13 +119,14 @@ within the community.
119119

120120
## Attribution
121121

122-
This Code of Conduct is adapted from the [Contributor
123-
Covenant](https://www.contributor-covenant.org), version 2.1, available
124-
at
122+
This Code of Conduct is adapted from the
123+
[Contributor Covenant](https://www.contributor-covenant.org), version
124+
2.1, available at
125125
<https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.
126126

127-
Community Impact Guidelines were inspired by [Mozilla's code of conduct
128-
enforcement ladder](https://github.com/mozilla/inclusion).
127+
Community Impact Guidelines were inspired by
128+
[Mozilla's code of conduct enforcement
129+
ladder](https://github.com/mozilla/inclusion).
129130

130131
For answers to common questions about this code of conduct, see the FAQ
131132
at <https://www.contributor-covenant.org/faq>. Translations are

CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ a terminal so that the working directory is the root of this project
4545
just run-all
4646
```
4747

48-
When committing changes, please try to follow [Conventional
49-
Commits](https://decisions.seedcase-project.org/why-conventional-commits/)
48+
When committing changes, please try to follow
49+
[Conventional Commits](https://decisions.seedcase-project.org/why-conventional-commits/)
5050
as Git messages. Using this convention allows us to be able to
5151
automatically create a release based on the commit message by using
5252
[Commitizen](https://decisions.seedcase-project.org/why-semantic-release-with-commitizen/).
5353
If you don't use Conventional Commits when making a commit, we will
54-
revise the pull request title to follow that format, as we use [squash
55-
merges](https://git-scm.com/docs/git-merge) when merging pull requests,
56-
when merging pull requests, so all other commits in the pull request
57-
will be squashed into one commit.
54+
revise the pull request title to follow that format, as we use
55+
[squash merges](https://git-scm.com/docs/git-merge) when merging pull
56+
requests, when merging pull requests, so all other commits in the pull
57+
request will be squashed into one commit.

NEWS.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Changelog
22

3-
Since we follow [Conventional
4-
Commits](https://decisions.seedcase-project.org/why-conventional-commits)
3+
Since we follow
4+
[Conventional Commits](https://decisions.seedcase-project.org/why-conventional-commits)
55
when writing commit messages, we're able to automatically create formal
66
"releases" of the website based on the commit messages. Releases in the
7-
context of websites are simply snapshots in time of the website
8-
content. We use
7+
context of websites are simply snapshots in time of the website content.
8+
We use
99
[Commitizen](https://decisions.seedcase-project.org/why-semantic-release-with-commitizen)
1010
to be able to automatically create these releases, which uses
1111
[SemVar](https://semverdoc.org) as the version numbering scheme.
@@ -38,7 +38,8 @@ each release.
3838

3939
### Fix
4040

41-
- 🐛 abort `use_targets_template()` if file name is not `_targets.R` (#181)
41+
- 🐛 abort `use_targets_template()` if file name is not `_targets.R`
42+
(#181)
4243

4344
## 0.8.9 (2026-02-13)
4445

@@ -88,7 +89,8 @@ each release.
8889

8990
### Refactor
9091

91-
- ♻️ get register name internally in `convert_to_parquet` from `path` (#161)
92+
- ♻️ get register name internally in `convert_to_parquet` from `path`
93+
(#161)
9294

9395
## 0.8.1 (2026-02-06)
9496

@@ -118,7 +120,8 @@ each release.
118120

119121
### Fix
120122

121-
- :bug: update `convert_*()` param name in template; `file_paths` -> `path` (#150)
123+
- :bug: update `convert_*()` param name in template; `file_paths` ->
124+
`path` (#150)
122125

123126
## 0.7.6 (2026-02-05)
124127

@@ -184,7 +187,8 @@ each release.
184187

185188
### Refactor
186189

187-
- :adhesive_bandage: ensure `source_file` is character before Arrow schema creation (#120)
190+
- :adhesive_bandage: ensure `source_file` is character before Arrow
191+
schema creation (#120)
188192

189193
## 0.6.1 (2026-01-25)
190194

@@ -196,7 +200,8 @@ each release.
196200

197201
### Feat
198202

199-
- ✨ read SAS files in chunks; lowercase column names; align Arrow schemas (#112)
203+
- ✨ read SAS files in chunks; lowercase column names; align Arrow
204+
schemas (#112)
200205

201206
## 0.5.0 (2025-12-15)
202207

cran-comments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
0 errors | 0 warnings | 1 note
44

5-
* This is a new release.
5+
- This is a new release.

justfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
just --list --unsorted
33

44
# Run all recipes
5-
run-all: clean install-deps document update-wordlist spell-check check-url-cran check-url-lychee style test build-website build-readme check install-package
5+
run-all: clean install-deps document update-wordlist spell-check check-url-cran check-url-lychee format-md style test build-website build-readme check install-package
66

77
# Clean up auto-generated files
88
clean:
@@ -90,3 +90,7 @@ preview-website:
9090
# List all TODO items in the repository
9191
list-todos:
9292
grep -R -n --exclude="justfile" --exclude-dir="docs/deps" --exclude="*.json" --exclude="*.html" "TODO" *
93+
94+
# Format Markdown files
95+
format-md:
96+
uvx rumdl fmt --silent

0 commit comments

Comments
 (0)