diff --git a/README.md b/README.md index 401fe73..5849e72 100644 --- a/README.md +++ b/README.md @@ -75,9 +75,11 @@ Here's a more complicated example that shows more options being used: # release of fourmolu will be used. version: "0.13.0.0" - # Only check the format of .hs in the src/ directory. + # Only check the format of .hs in the src/ directory + # except src/Main.hs. pattern: | src/**/*.hs + !src/Main.hs # Don't follow symbolic links to .hs files. follow-symbolic-links: false @@ -86,6 +88,8 @@ Here's a more complicated example that shows more options being used: extra-args: "--indent-wheres true" ``` +See [docs](https://github.com/actions/toolkit/tree/main/packages/glob#patterns) on pattern syntax. + ### Example usage with build matrix If you are using a build matrix, then it is more efficient to have a diff --git a/action.yml b/action.yml index 540d545..c16d391 100644 --- a/action.yml +++ b/action.yml @@ -3,9 +3,19 @@ description: 'Check formatting of Haskell code with Fourmolu' inputs: pattern: required: false - description: > - Glob pattern that are used to find source files to format. It is - possible to specify several patterns by putting each on a new line. + description: | + Glob pattern that is used to find source files to format. + + See [docs](https://github.com/actions/toolkit/tree/main/packages/glob#patterns) on pattern syntax. + + It is possible to specify several patterns by putting each one on a new line. + + ```yaml + src/**/*.hs + !src/Main.hs + ``` + + `src/Main.hs` will be skipped. default: | **/*.hs **/*.hs-boot