Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit eb31283

Browse files
committedJun 9, 2023
refactor: removed markdownlint changes in this PR
1 parent d5b74e0 commit eb31283

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
 

‎Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@ format:
284284
docs-lint:
285285
markdownlint . --fix
286286

287+
docs-lint-changed:
288+
./scripts/linting/lint-changed-md-files.sh
289+
287290
.PHONY: lint lint-fix lint-fix-changed docs-lint docs-lint-changed
288291

289292
###############################################################################
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
# lint_modified_markdown_files runs the linter only if changes have been made to any md files.
6+
function lint_modified_markdown_files() {
7+
local markdown_files="$(git diff --name-only | grep \.md$)"
8+
for f in $markdown_files; do
9+
markdownlint "${f}" --fix
10+
done
11+
}
12+
13+
lint_modified_markdown_files

0 commit comments

Comments
 (0)
Please sign in to comment.