Skip to content

Commit 630d390

Browse files
authored
Merge pull request #2 from 84codes/config-file
Allow config to be passed
2 parents 9acf997 + 43ad06e commit 630d390

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +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'
4344
reviewdog_flags: -filter-mode=file -fail-on-error

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ inputs:
2828
reviewdog_flags:
2929
description: 'Additional reviewdog flags'
3030
default: ''
31+
### Flags for haml-lint
32+
haml_lint_config:
33+
description: 'Path to config file'
34+
default: '.haml-lint.yml'
3135
runs:
3236
using: 'docker'
3337
image: 'Dockerfile'

entrypoint.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
#!/bin/sh
22
set -e
33

4+
config() {
5+
if [ -n "$1" ]; then
6+
echo "-c $1"
7+
fi
8+
}
9+
410
if [ -n "${GITHUB_WORKSPACE}" ] ; then
511
cd "${GITHUB_WORKSPACE}/${INPUT_WORKDIR}" || exit
612
fi
713

814
export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"
915

10-
haml-lint . \
16+
haml-lint "$(config "$INPUT_HAML_LINT_CONFIG")" . \
1117
| reviewdog -efm="%f:%l [%t] %m" \
1218
-name="haml-lint" \
1319
-reporter="${INPUT_REPORTER:-github-pr-check}" \

testdata/.haml-lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
linters:
2+
LineLength:
3+
max: 1

0 commit comments

Comments
 (0)