A GitHub action for syntax checking fish shell files.
Here's an example from the test workflow for Pond:
This action requires the fish shell. You can install it using the fish-actions/install-fish action.
Add a suitable uses
step to your GitHub workflow as shown below:
- name: Syntax check
uses: fish-shop/syntax-check@v1
By default, all files under $GITHUB_WORKSPACE
with a .fish
file extension are checked. To specify a different file pattern to match against, provide a value for the pattern
input. For example, to check all .fish
files starting in the src
directory and descending into subdirectories:
- name: Syntax check
uses: fish-shop/syntax-check@v1
with:
pattern: src/**.fish
Multiple space-separated pattern
values are supported and can include wildcards and brace expansion:
- name: Syntax check
uses: fish-shop/syntax-check@v1
with:
pattern: init.fish functions/**.fish {conf.d,completions}/**.fish tests/???-*.fish
Use one of the following patterns when specifying the version reference for this action in your workflow (i.e. the {ref}
value in uses: fish-shop/syntax-check@{ref}
):
Pattern | Example | Description |
---|---|---|
vX |
v1 |
the latest v1.* release including non-breaking changes and bug fixes |
vX.Y |
v1.1 |
the latest v1.1.* release including bug fixes |
vX.Y.Z |
v1.1.0 |
the v1.1.0 release only |
Tip
The recommended pattern is vX
(e.g. v1
). This will ensure that the version of the action used in your workflow includes the latest non-breaking changes and bug fixes, and guarantees compatibility with previous versions of that major release number.
Using a main
branch reference in your workflow is not recommended as this branch may include breaking changes intended for the next major release.
A number of related composite actions are also available from the fish-shop 🐟. Check them out:
- fish-shop/install-plugin - A GitHub action for installing fish shell plugins
- fish-shop/install-plugin-manager - A GitHub action for installing a fish shell plugin manager
- fish-shop/run-fishtape-tests - A GitHub action for running Fishtape tests
- This project was inspired by fish-actions/syntax-check
- Fish market icon made by Freepik from www.flaticon.com
fish-shop/syntax-check
is provided under the terms of the MIT License.
Email me at marc.ransome@fidgetbox.co.uk or create an issue.