Skip to content

Add CI for formatting and linting checks - #6

Open
etiennebacher wants to merge 4 commits into
mainfrom
lint-format
Open

Add CI for formatting and linting checks#6
etiennebacher wants to merge 4 commits into
mainfrom
lint-format

Conversation

@etiennebacher

@etiennebacher etiennebacher commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

This adds the same workflows as in palaeoverse but replaces Air by Panache for formatting. I also ran panache format **/*.qmd to format all qmd files (only ggplot/index.qmd so 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

@etiennebacher etiennebacher changed the title Add CI for Panache and Jarl checks Add CI for formatting and linting checks Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

@willgearty

Copy link
Copy Markdown
Member

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?

@etiennebacher

etiennebacher commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator Author

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.

@etiennebacher

Copy link
Copy Markdown
Collaborator Author

I don't remember why I hadn't put this as "ready for review"

@etiennebacher
etiennebacher marked this pull request as ready for review July 27, 2026 13:46
Comment thread ggplot/index.qmd
Comment on lines +26 to +27
```{r}
#| label: ggplot2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for switching to this? Is this considered better practice for some reason?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, TIL

@willgearty
willgearty requested a review from LewisAJones August 11, 2026 22:06

@LewisAJones LewisAJones left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# "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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also need to set up dependabot for updating?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run lint check(s) for PRs and pushes

3 participants