From be165627186076a3db4bc2a16a0ec05462579d5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Simonis?= Date: Wed, 20 Mar 2024 16:43:45 +0100 Subject: [PATCH] Add pre-commit website lints (#183) * Add lints for website integration * Apply preCICE config formatting * Remove the redundant workflow --- .github/workflows/lint_markdown.yml | 20 -------------------- .markdownlint.json | 3 ++- .pre-commit-config.yaml | 12 +++++++++++- examples/lci_2d/precice-config.xml | 7 ------- examples/lci_3d/precice-config.xml | 7 ------- examples/nn/precice-config.xml | 8 -------- examples/nng_scalar/precice-config.xml | 7 ------- examples/nng_vector/precice-config.xml | 7 ------- examples/replay_mode/precice-config.xml | 11 ----------- 9 files changed, 13 insertions(+), 69 deletions(-) delete mode 100644 .github/workflows/lint_markdown.yml diff --git a/.github/workflows/lint_markdown.yml b/.github/workflows/lint_markdown.yml deleted file mode 100644 index 21ed1a1c..00000000 --- a/.github/workflows/lint_markdown.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Lint docs - -on: - push: - branches: [master, develop] - pull_request: - branches: [master, develop] - -jobs: - check_md: - runs-on: ubuntu-latest - steps: - - name: Check out repository - uses: actions/checkout@v4 - - name: Lint markdown files (markdownlint) - uses: articulate/actions-markdownlint@v1 - with: - config: .markdownlint.json - files: "." - ignore: changelog-entries diff --git a/.markdownlint.json b/.markdownlint.json index e1206708..7fa3b745 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -1,4 +1,5 @@ { "MD013": false, - "MD033": false + "MD033": false, + "MD041": false } diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index adbd2817..7bdb457e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,7 +30,17 @@ repos: - id: requirements-txt-fixer # Custom repo for the preCICE configuration formatter - repo: https://github.com/precice/precice-pre-commit-hooks - rev: "v2.1" + rev: "v3.2" hooks: - id: format-precice-config exclude: "tools" + - id: check-image-prefix + files: "^docs/images/.*" + args: [ --prefix=docs-tooling-aste- ] + - repo: https://github.com/igorshubovych/markdownlint-cli + rev: v0.39.0 + hooks: + - id: markdownlint + exclude: changelog-entries + - id: markdownlint-fix + exclude: changelog-entries diff --git a/examples/lci_2d/precice-config.xml b/examples/lci_2d/precice-config.xml index 511e6d5b..8d731bc2 100644 --- a/examples/lci_2d/precice-config.xml +++ b/examples/lci_2d/precice-config.xml @@ -18,17 +18,13 @@ - - - - - - - diff --git a/examples/lci_3d/precice-config.xml b/examples/lci_3d/precice-config.xml index e2e3c4d2..e5ba7079 100644 --- a/examples/lci_3d/precice-config.xml +++ b/examples/lci_3d/precice-config.xml @@ -18,17 +18,13 @@ - - - - - - - diff --git a/examples/nn/precice-config.xml b/examples/nn/precice-config.xml index 1a3c9f21..58a057c3 100644 --- a/examples/nn/precice-config.xml +++ b/examples/nn/precice-config.xml @@ -18,19 +18,14 @@ - - - - - @@ -40,11 +35,8 @@ - - - diff --git a/examples/nng_scalar/precice-config.xml b/examples/nng_scalar/precice-config.xml index a7ce9abf..c5f22d86 100644 --- a/examples/nng_scalar/precice-config.xml +++ b/examples/nng_scalar/precice-config.xml @@ -18,17 +18,13 @@ - - - - - - - diff --git a/examples/nng_vector/precice-config.xml b/examples/nng_vector/precice-config.xml index a5f9d601..4d3868c5 100644 --- a/examples/nng_vector/precice-config.xml +++ b/examples/nng_vector/precice-config.xml @@ -18,17 +18,13 @@ - - - - - - - diff --git a/examples/replay_mode/precice-config.xml b/examples/replay_mode/precice-config.xml index b3958859..32a87875 100644 --- a/examples/replay_mode/precice-config.xml +++ b/examples/replay_mode/precice-config.xml @@ -19,13 +19,9 @@ - - - - - - - - @@ -57,11 +49,8 @@ - - -