From 88386d9893306402023c4668c6966ee7441786ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20J=C3=B8rgensen?= Date: Sat, 5 Dec 2020 18:34:32 +0100 Subject: [PATCH] feat: Add problem matcher * Add problem matcher * Fix loading tar file from artifacts --- Dockerfile | 4 ++-- hadolint.sh | 5 +++++ problem-matcher.json | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100755 hadolint.sh create mode 100644 problem-matcher.json 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 + } + ] + } + ] +}