From 5a0378fee52112639128d326d41b76bf7bfc6bea Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Fri, 9 Apr 2021 10:11:11 -0700 Subject: [PATCH] Remove hadolint and add deprecation notice --- .pre-commit-hooks.yaml | 14 ++++++++------ README.md | 7 ++----- hadolint-deprecation.sh | 8 ++++++++ 3 files changed, 18 insertions(+), 11 deletions(-) create mode 100755 hadolint-deprecation.sh diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 8fa4edd..1665105 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -5,15 +5,17 @@ language: script entry: compose-check.sh files: docker-compose.y[a]{0,1}ml$ + - id: hadolint name: Lint Dockerfiles - description: Runs hadolint Docker image to lint Dockerfiles - language: docker_image - entry: hadolint/hadolint hadolint + description: Deprecated! Runs hadolint Docker image to lint Dockerfiles + language: script + entry: hadolint-deprecation.sh files: Dockerfile + - id: hadolint-system name: Lint Dockerfiles - description: Runs system hadolint to lint Dockerfiles - language: system - entry: hadolint + description: Deprecated! Runs system hadolint to lint Dockerfiles + language: script + entry: hadolint-deprecation.sh files: Dockerfile diff --git a/README.md b/README.md index b0e6f17..e8b6938 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,5 @@ A set of [pre-commit](http://pre-commit.com) hooks for Docker services ### docker-compose-check Verifies that docker-compose files are valid by using `docker-compose config` to parse them. -### hadolint -Uses the [hadolint Docker image](https://hub.docker.com/r/hadolint/hadolint) to lint Dockerfiles. - -### hadolint-system -Uses the whatever version of hadolint that you have installed to lint Dockerfiles. This requires you to have hadolint installed somewhere in your path. +### hadolint (Removed) +These hooks have been removed in favor of the ones that have been added to https://github.com/hadolint/hadolint diff --git a/hadolint-deprecation.sh b/hadolint-deprecation.sh new file mode 100755 index 0000000..770c8bb --- /dev/null +++ b/hadolint-deprecation.sh @@ -0,0 +1,8 @@ +#! /bin/sh + +echo "Hadolint hooks have been deprecated in favor of upstream" +echo "repo: https://github.com/hadolint/hadolint" +echo "Replace hook 'hadolint' with 'hadolint-docker'" +echo "Replace hook 'hadolint-system' with 'hadolint'" + +exit 1