mirror of
https://github.com/sparksp/elm-format-action.git
synced 2024-11-24 13:32:54 +03:00
GitHub Action to validate Elm code is formatted correctly
4e78434538
Bumps [tar](https://github.com/npm/node-tar) from 4.4.13 to 4.4.15. - [Release notes](https://github.com/npm/node-tar/releases) - [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md) - [Commits](https://github.com/npm/node-tar/compare/v4.4.13...v4.4.15) --- updated-dependencies: - dependency-name: tar dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> |
||
---|---|---|
__tests__ | ||
.github/workflows | ||
dist | ||
src | ||
.eslintignore | ||
.eslintrc.json | ||
.gitignore | ||
.prettierignore | ||
.prettierrc.json | ||
action.yml | ||
jest.config.js | ||
LICENSE | ||
package.json | ||
README.md | ||
tsconfig.eslint.json | ||
tsconfig.json | ||
yarn.lock |
elm-format --validate
Validate your Elm files using elm-format - any unformatted files will cause the check to fail and a note will be added to each failing file.
Finding elm-format
You must have elm-format
available in your build, here is an example where elm-format is in package.json
.
jobs:
lint:
steps:
- uses: actions/checkout@v2
- run: yarn
- name: Add elm-format to path
run: yarn bin >> $GITHUB_PATH
- uses: sparksp/elm-format-action@v1
with:
# elm_format: elm-format
# elm_files: src/
# elm_glob: false
# working-directory: ./
Multiple Files
To match multiple files or directories, list each on a new line...
- uses: sparksp/elm-format-action@v1
with:
elm_files: |
src/Main.elm
src/Wait.elm
tests/
File Glob
This action supports file globs using @actions/glob. elm-format will process each file or directory it is given, so take care to match only elm files OR directories with your globs.
- uses: sparksp/elm-format-action@v1
with:
# Match all elm files except any TW.elm
elm_files: |
src/**/*.elm
!**/TW.elm
elm_glob: true