Skip to content

Commit 2492242

Browse files
authored
Merge pull request #3 from 84codes/any-flags
Any flags
2 parents 6284592 + 6932bd7 commit 2492242

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ jobs:
4040
github_token: ${{ secrets.github_token }}
4141
reporter: github-pr-review
4242
level: error
43-
haml_lint_config: './testdata/.haml-lint.yml'
43+
haml_lint_config: -c ./testdata/.haml-lint.yml
4444
reviewdog_flags: -filter-mode=file -fail-on-error

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ inputs:
5151
reviewdog_flags:
5252
description: 'Additional reviewdog flags'
5353
default: ''
54-
### Flags for haml-lint ###
55-
haml_lint_config:
56-
description: 'Path to config file'
57-
default: '.haml-lint.yml'
54+
### Flags for haml-lint
55+
haml_lint_flags:
56+
description: 'Additional haml-lint flags'
57+
default: ''
5858
```
5959
6060
## Usage
@@ -76,7 +76,7 @@ jobs:
7676
# Change reporter level if you need.
7777
# GitHub Status Check won't become failure with warning.
7878
level: warning
79-
haml_lint_config: .haml-config.yml # defaults to .haml-lint.yml
79+
haml_lint_flags: -c .haml-config.yml
8080
```
8181
8282
## Development

action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ inputs:
2929
description: 'Additional reviewdog flags'
3030
default: ''
3131
### Flags for haml-lint
32-
haml_lint_config:
33-
description: 'Path to config file'
34-
default: '.haml-lint.yml'
32+
haml_lint_flags:
33+
description: 'Additional haml-lint flags'
34+
default: ''
3535
runs:
3636
using: 'docker'
3737
image: 'Dockerfile'

entrypoint.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/sh
22
set -e
33

4-
config() {
4+
haml_lint_flags() {
55
if [ -n "$1" ]; then
6-
echo "-c $1"
6+
echo "$1"
77
fi
88
}
99

@@ -13,8 +13,9 @@ fi
1313

1414
export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"
1515

16-
haml-lint "$(config "$INPUT_HAML_LINT_CONFIG")" . \
17-
| reviewdog -efm="%f:%l [%t] %m" \
16+
# shellcheck disable=SC2046
17+
# shellcheck disable=SC2086
18+
haml-lint $(haml_lint_flags "$INPUT_HAML_LINT_FLAGS") . | reviewdog -efm="%f:%l [%t] %m" \
1819
-name="haml-lint" \
1920
-reporter="${INPUT_REPORTER:-github-pr-check}" \
2021
-filter-mode="${INPUT_FILTER_MODE}" \

testdata/text.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
%h1
2-
it works
2+
maybe it works

0 commit comments

Comments
 (0)