Skip to content

Commit 7c92e24

Browse files
committed
feat(githooks): add Markdown links check and update configuration paths
1 parent 85b8dd5 commit 7c92e24

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed
File renamed without changes.

scripts/config/pre-commit.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,8 @@ repos:
1616
entry: bash -c 'check=staged-changes ./scripts/githooks/check-markdown-format.sh'
1717
language: system
1818
pass_filenames: false
19+
- id: check-markdown-links
20+
name: Check Markdown links
21+
entry: bash -c 'check=staged-changes ./scripts/githooks/check-markdown-links.sh'
22+
language: system
23+
pass_filenames: false

scripts/githooks/check-markdown-links.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ set -euo pipefail
2222
# 1 - Invalid links found
2323
#
2424
# Notes:
25-
# 1) The lychee configuration file is located at './lychee.toml'.
25+
# 1) The lychee configuration file is located at './scripts/config/lychee.toml'.
2626
# 2) For more information, visit https://github.com/lycheeverse/lychee
2727

2828
# ==============================================================================
@@ -63,7 +63,7 @@ function run-lychee-natively() {
6363

6464
# shellcheck disable=SC2086
6565
lychee \
66-
--config "$PWD/lychee.toml" \
66+
--config "$PWD/scripts/config/lychee.toml" \
6767
--no-progress \
6868
--quiet \
6969
$files
@@ -84,7 +84,7 @@ function run-lychee-in-docker() {
8484
--volume "$PWD":/workdir \
8585
--workdir /workdir \
8686
"$image" \
87-
--config /workdir/lychee.toml \
87+
--config /workdir/scripts/config/lychee.toml \
8888
--no-progress \
8989
--quiet \
9090
$files

0 commit comments

Comments
 (0)