https://github.com/freckle/weeder-action
Run Weeder to uncover unused Haskell functions
https://github.com/freckle/weeder-action
actions ghvm-managed haskell
Last synced: 27 days ago
JSON representation
Run Weeder to uncover unused Haskell functions
- Host: GitHub
- URL: https://github.com/freckle/weeder-action
- Owner: freckle
- License: mit
- Created: 2021-11-16T14:18:05.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-01T21:12:45.000Z (7 months ago)
- Last Synced: 2025-04-11T20:42:03.775Z (7 months ago)
- Topics: actions, ghvm-managed, haskell
- Language: Haskell
- Homepage:
- Size: 125 KB
- Stars: 8
- Watchers: 13
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Weeder Action
GitHub Action to run Weeder to find any unused functions in a Haskell project
and annotate the Build with their locations.

## Prerequisites
See the [Weeder README][weeder] for project requirements.
[weeder]: https://github.com/ocharles/weeder#readme
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
```yaml
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.
[conventional commits]: https://www.conventionalcommits.org/en/v1.0.0/#summary
---
[LICENSE](./LICENSE)