diff --git a/Dockerfile b/Dockerfile index 8202bf2..70f4d3a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM hadolint/hadolint:v1.17.5-alpine COPY LICENSE README.md / +COPY hadolint.sh /usr/local/bin/hadolint.sh -ENTRYPOINT [ "hadolint" ] - +ENTRYPOINT [ "/usr/local/bin/hadolint.sh" ] diff --git a/hadolint.sh b/hadolint.sh new file mode 100755 index 0000000..23d6cb9 --- /dev/null +++ b/hadolint.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +echo '::add-matcher::problem-matcher.json' + +hadolint "$@" diff --git a/problem-matcher.json b/problem-matcher.json new file mode 100644 index 0000000..f720974 --- /dev/null +++ b/problem-matcher.json @@ -0,0 +1,15 @@ +{ + "problemMatcher": [ + { + "owner": "hadolint", + "pattern": [ + { + "regexp": "(.*)\\:(\\d+)\\s(.*)", + "file": 1, + "line": 2, + "message": 3 + } + ] + } + ] +}