From 03c1db550a8d2b4ad4883e6bf9f8f606853a5d70 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Tue, 19 Dec 2023 20:12:37 +0000 Subject: [PATCH 1/2] add pre-commit.com hooks for lint-collection-docs --- .pre-commit-hooks.yaml | 15 +++++++++++++++ changelogs/fragments/231-pre-commit.yaml | 4 ++++ 2 files changed, 19 insertions(+) create mode 100644 .pre-commit-hooks.yaml create mode 100644 changelogs/fragments/231-pre-commit.yaml diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml new file mode 100644 index 00000000..4e46b15d --- /dev/null +++ b/.pre-commit-hooks.yaml @@ -0,0 +1,15 @@ +# Copyright (C) 2023 Maxwell G +# SPDX-License-Identifier: GPL-3.0-or-later +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or +# https://www.gnu.org/licenses/gpl-3.0.txt) +--- +- id: lint-collection-docs + name: Lint collection docs + language: python + pass_filenames: false + entry: "antsibull-docs lint-collection-docs ." + # Default arguments based on the collection_template. + # Users can change these if they wish + args: + - "--plugin-docs" + - "--skip-rstcheck" diff --git a/changelogs/fragments/231-pre-commit.yaml b/changelogs/fragments/231-pre-commit.yaml new file mode 100644 index 00000000..4cd5cd72 --- /dev/null +++ b/changelogs/fragments/231-pre-commit.yaml @@ -0,0 +1,4 @@ +--- +minor_changes: + - Add pre-commit.com hook for ``antsibull-docs lint-collection-docs`` + (https://github.com/ansible-community/antsibull-docs/pull/231). From f5c1c79426bf0af6b70be6559db9ab15f5370305 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Mon, 19 Aug 2024 16:23:01 +0100 Subject: [PATCH 2/2] Update .pre-commit-hooks.yaml Co-authored-by: Felix Fontein --- .pre-commit-hooks.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 4e46b15d..1ebb7280 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -13,3 +13,5 @@ args: - "--plugin-docs" - "--skip-rstcheck" + additional_dependencies: + - ansible-core >= 2.14.0