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.
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
version
does what you think it does - pick a release but don't include thev
!options
can be used to pass options tonph
- typically, these will be the files or directories that you want to check -.
recursively checks all recognised files!fail
will fail the job if formatting finds any differencessuggest
can be used to turn of auto-suggestions
This action was heavily inspired by rickstaa/action-black!