-
Notifications
You must be signed in to change notification settings - Fork 5
Add run-cabal-gild action #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: latest
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| run-cabal-gild/dist/index.js linguist-generated=true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| **/node_modules |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| This code is an adaptation of https://github.com/haskell-actions/run-fourmolu | ||
| which in turn was an adaptation. Here is the license as included in the | ||
| `run-fourmolu` code: | ||
|
|
||
| This code was originally written by Mark Karpov for Ormolu: | ||
| https://github.com/mrkkrp/ormolu-action. The following is the license for that | ||
| code: | ||
|
|
||
| Copyright © 2020–2022 Mark Karpov | ||
|
|
||
| All rights reserved. | ||
|
|
||
| Redistribution and use in source and binary forms, with or without | ||
| modification, are permitted provided that the following conditions are met: | ||
|
|
||
| * Redistributions of source code must retain the above copyright notice, | ||
| this list of conditions and the following disclaimer. | ||
|
|
||
| * Redistributions in binary form must reproduce the above copyright | ||
| notice, this list of conditions and the following disclaimer in the | ||
| documentation and/or other materials provided with the distribution. | ||
|
|
||
| * Neither the name Mark Karpov nor the names of contributors may be used to | ||
| endorse or promote products derived from this software without specific | ||
| prior written permission. | ||
|
|
||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS “AS IS” AND ANY EXPRESS | ||
| OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
| OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
| NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, | ||
| OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | ||
| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
|
||
| ------------------------------------------ | ||
|
|
||
| The above repo has been updated to work with Fourmolu in this repository. | ||
| This new code uses the following license: | ||
|
|
||
| Copyright © 2022–present Bitnomial | ||
|
|
||
| All rights reserved. | ||
|
|
||
| Redistribution and use in source and binary forms, with or without | ||
| modification, are permitted provided that the following conditions are met: | ||
|
|
||
| * Redistributions of source code must retain the above copyright notice, | ||
| this list of conditions and the following disclaimer. | ||
|
|
||
| * Redistributions in binary form must reproduce the above copyright | ||
| notice, this list of conditions and the following disclaimer in the | ||
| documentation and/or other materials provided with the distribution. | ||
|
|
||
| * Neither the name Mark Karpov nor the names of contributors may be used to | ||
| endorse or promote products derived from this software without specific | ||
| prior written permission. | ||
|
|
||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS “AS IS” AND ANY EXPRESS | ||
| OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
| OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
| NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, | ||
| OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | ||
| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # cabal-gild action | ||
|
|
||
| This `run-cabal-gild` GitHub Action helps to ensure that your Haskell project is | ||
| formatted with [cabal-gild](https://github.com/tfausak/cabal-gild). The action | ||
| tries to find all Cabal source code files in your repository and fails if any | ||
| of them are not formatted. In case of failure it prints the diff between the | ||
| actual contents of the file and its formatted version. | ||
|
|
||
| ## Example usage | ||
|
|
||
| In the simple case all you need to do is to add this step to your job: | ||
|
|
||
| ```yaml | ||
| - uses: input-output-hk/actions/run-cabal-gild@v1 | ||
| with: | ||
| version: "1.7.0.1" | ||
| ``` | ||
|
|
||
| The `1.7.0.1` should be replaced with the version of cabal-gild you want to use. See | ||
| [cabal-gild releases](https://github.com/tfausak/cabal-gild/releases) for all cabal-gild versions. | ||
| If you don't specify this cabal-gild `version` input, the latest version of | ||
| cabal-gild will be used. |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,30 @@ | ||||||||||||||||||||||||||
| name: 'Run cabal-gild' | ||||||||||||||||||||||||||
| description: 'Check formatting of Cabal code with cabal-gild' | ||||||||||||||||||||||||||
| inputs: | ||||||||||||||||||||||||||
| follow-symbolic-links: | ||||||||||||||||||||||||||
| required: false | ||||||||||||||||||||||||||
| description: > | ||||||||||||||||||||||||||
| Whether to follow symbolic links. | ||||||||||||||||||||||||||
| default: true | ||||||||||||||||||||||||||
| extra-args: | ||||||||||||||||||||||||||
| required: false | ||||||||||||||||||||||||||
| description: > | ||||||||||||||||||||||||||
| Extra arguments to pass to Fourmolu. | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
| Extra arguments to pass to Fourmolu. | |
| Extra arguments to pass to cabal-gild. |
Copilot
AI
Mar 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version input examples look like Fourmolu versions (e.g. 0.13.0.0) rather than cabal-gild (README uses 1.7.0.1). This can confuse users; please update the example versions to match cabal-gild releases.
| Extra arguments to pass to Fourmolu. | |
| version: | |
| required: false | |
| description: > | |
| The version number of cabal-gild to use. Defaults to "latest". Example | |
| version numbers -- `0.13.0.0`, `0.10.1.0`, etc. See | |
| Extra arguments to pass to cabal-gild. | |
| version: | |
| required: false | |
| description: > | |
| The version number of cabal-gild to use. Defaults to "latest". Example | |
| version numbers -- `1.7.0.1`, `1.6.0.0`, etc. See |
Copilot
AI
Mar 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The working-directory input description mentions a pattern argument and contains a spelling error ("interpretted"). There is no pattern input in this action, so the description should be updated to match the actual inputs and "interpreted" spelling.
| Directory in which to run cabal-gild. This also affects how the `pattern` | |
| argument is interpretted, with Glob patterns being relative to this | |
| `working-directory` argument. | |
| Directory in which to run cabal-gild. Paths and glob patterns will be | |
| resolved relative to this directory. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
follow-symbolic-linksis a boolean-like input but (unlike other actions in this repo) it does not declaretype: boolean. Consider addingtype: boolean(see e.g.base/action.ymlanddevx/action.yml) to make the metadata consistent and to ensure tooling/UIs treat it as a boolean.