Skip to content

freckle/weeder-action

Repository files navigation

Weeder Action

GitHub Action to run Weeder to find any unused functions in a Haskell project and annotate the Build with their locations.

Example in Diff

Prerequisites

See the Weeder README for project requirements.

You will need to run this step in the same Job as you compile your project, or make the .hie files available some other way.

Usage

steps:
  - uses: actions/checkout@v4
  - id: stack
    uses: freckle/stack-action@v5
  - uses: freckle/weeder-action@v3
    with:
      ghc-version: ${{ steps.stack.outputs.compiler-version }}

Inputs

name description required default
ghc-version

Full version of GHC your project uses, to ensure HIE compatibility

true ""
weeder-arguments

Arguments to pass when invoking weeder

false --require-hs-files
working-directory

Change to this directory before operating

false .
fail

Fail the build if unused functions found?

false true

Outputs

name description
log

Path to a file containing found weeds in JSON format; a list of objects with the keys identifier, file, and line.

Release

To trigger a release (and update the @v{major} tag), merge a commit to main that follows Conventional Commits. In short,

  • fix: to trigger a patch release,
  • feat: for minor, and
  • feat!: and major

We don't enforce conventional commits generally (though you are free do so), it's only required if you want to trigger release.


LICENSE

About

Run Weeder to uncover unused Haskell functions

Topics

Resources

License

Stars

Watchers

Forks

Contributors 7