Add CI for formatting and linting checks - #6
Conversation
|
Hmm...I've always preferred to keep prose in long-form (not split to multiple lines) in markdown-like documents. Can we skip that check? |
|
Sure, I added a config file to format code chunks but leave the surrounding text intact. I think we still want to have consistent code formatting since this is visible to readers. |
|
I don't remember why I hadn't put this as "ready for review" |
| ```{r} | ||
| #| label: ggplot2 |
There was a problem hiding this comment.
What's the reason for switching to this? Is this considered better practice for some reason?
There was a problem hiding this comment.
It's the recommended way in Quarto: https://quarto.org/docs/computations/r.html#chunk-options
There are some corner case issues when using the old syntax in Quarto docs, e.g. quarto-dev/quarto#1023
LewisAJones
left a comment
There was a problem hiding this comment.
Looks good... couple of comments for consideration.
I agree with @willgearty regarding not hard-wrapping long lines for prose.
| @@ -0,0 +1,68 @@ | |||
| # This workflow runs Panache for formatting and Jarl for linting. It stores artifacts about the | |||
| # outcome of each tool and the PR number. Those artifacts are then used in the workflow | |||
| # "format-lint-pr-comment.yaml" to post a comment so that it's clearer for external | |||
There was a problem hiding this comment.
| # "format-lint-pr-comment.yaml" to post a comment so that it's clearer for external | |
| # "format-lint-comment.yaml" to post a comment so that it's clearer for external |
Correct file name?
| pull-requests: write | ||
| actions: read | ||
| steps: | ||
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 |
There was a problem hiding this comment.
Do we also need to set up dependabot for updating?
This adds the same workflows as in
palaeoversebut replaces Air by Panache for formatting. I also ranpanache format **/*.qmdto format all qmd files (onlyggplot/index.qmdso far).@willgearty Panache formats text in addition to code chunks, for instance to wrap text to a maximum width. Is this fine with you?
Fixes #5