This action downloads and runs leptosfmt on your Rust codebase. See the leptosfmt repository for more information.
leptosfmt
arguments can be passed to the action via the args
parameter.
The action also supports some additional arguments.
Argument | Default | Description |
---|---|---|
args |
./**/*.rs --check |
See Leptosfmt's documentation for all arguments and values |
debug |
false |
Enable debug output in action (set -x). Helpful for troubleshooting |
failOnError |
true |
Fail workflow run on error (i.e. when leptosfmt exit code is not 0) |
leptosfmtVersion |
0.1.32 |
Overwrite the leptosfmt version to be used |
output |
leptosfmt_output.txt |
Output from leptosfmt will be written to this file |
Output | Description |
---|---|
exit_code |
Exit code of leptosfmt |
name: leptosfmt
on:
workflow_dispatch:
pull_request:
push:
jobs:
leptosfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: LesnyRumcajs/leptosfmt-action@v0.1.0
name: leptosfmt
on:
workflow_dispatch:
pull_request:
push:
jobs:
leptosfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: leptosfmt
id: leptosfmt
uses: LesnyRumcajs/leptosfmt-action@v0.1.0
with:
failOnError: false
- name: print outputs
if: steps.leptosfmt.outputs.exit_code != 0
run: |
cat leptosfmt_output.txt
If you encounter any issues with this action, please report them here. If the issue is with leptosfmt
itself, please report it to the leptosfmt repository.