From c0a8b0f554e04c6d9aacfb48c4e1556d3eb199fe Mon Sep 17 00:00:00 2001 From: Yu Ishikawa Date: Mon, 2 Dec 2024 09:29:06 +0900 Subject: [PATCH] Upgrade pre-commit hooks (#137) --- .github/workflows/dockerimage.yml | 3 ++- .pre-commit-config.yaml | 8 ++++---- Makefile | 14 ++++++++------ 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index 0402ca9..7a7b636 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -10,4 +10,5 @@ jobs: steps: - uses: actions/checkout@v4 - name: Build the Docker image - run: docker build . --file Dockerfile --tag ${{ github.repository }}:$(date +%s) + run: | + docker build . --file Dockerfile --tag "${{ github.repository }}:$(date +%s)" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 28a7f6d..19cb98f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,15 +1,15 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: end-of-file-fixer - id: trailing-whitespace - id: check-yaml - repo: https://github.com/rhysd/actionlint - rev: v1.6.25 + rev: v1.7.4 hooks: - id: actionlint - repo: https://github.com/hadolint/hadolint - rev: v2.12.0 + rev: v2.13.1-beta hooks: - - id: hadolint + - id: hadolint-docker diff --git a/Makefile b/Makefile index 7812be0..f2474d3 100644 --- a/Makefile +++ b/Makefile @@ -2,13 +2,15 @@ setup-dev: SQLFLUFF_VERSION=3.0.7 python -m pip install --force-reinstall -r requirements/requirements.txt pre-commit install -lint: lint-shell lint-json lint-docker - -lint-shell: - shellcheck entrypoint.sh +lint: lint-json run-pre-commit lint-json: cat "to-rdjson.jq" | jq empty > /dev/null 2>&1; echo "$?" -lint-docker: - hadolint Dockerfile +run-pre-commit: + pre-commit run --all-files + +maintain: update-pre-commit + +update-pre-commit: + pre-commit autoupdate