Skip to content

fish-shop/syntax-check

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

Repository files navigation

fish

fish-shop/syntax-check

Tests Issues Dependabot License fish

A GitHub action for syntax checking fish shell files.


Here's an example from the test workflow for Pond:

Prerequisites

This action requires the fish shell. You can install it using the fish-actions/install-fish action.

Usage

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

Action versions

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.

Other GitHub actions

A number of related composite actions are also available from the fish-shop 🐟. Check them out:

Acknowledgements

License

fish-shop/syntax-check is provided under the terms of the MIT License.

Contact

Email me at marc.ransome@fidgetbox.co.uk or create an issue.