Skip to content

arnetheduck/nph-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

nph Github Action

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
  • version does what you think it does - pick a release but don't include the v!
  • options can be used to pass options to nph - 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 differences
  • suggest can be used to turn of auto-suggestions

Credits

This action was heavily inspired by rickstaa/action-black!

About

Github action for the `nph` code formatter

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published