nph Github Action
January 8, 2025 ยท View on GitHub
This action downloads and runs the nph formatter on Nim source code, suggesting changes based on git diff between the repository and the formatted output.
Quickstart
The following snippet shows the action and its default options. You can remove the with section if you're happy with the defaults, though typically you will want to choose a specific version of nph (ie 0.6.1 at the time of writing).
name: Check `nph` formatting
on:
pull_request:
jobs:
nph:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check `nph` formatting
uses: arnetheduck/nph-action@v1
with:
version: latest
options: "."
fail: true
suggest: true
versiondoes what you think it does - pick a release but don't include thev!optionscan be used to pass options tonph- typically, these will be the files or directories that you want to check -.recursively checks all recognised files!failwill fail the job if formatting finds any differencessuggestcan be used to turn of auto-suggestions
Credits
This action was heavily inspired by rickstaa/action-black!