-
Notifications
You must be signed in to change notification settings - Fork 627
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: removed markdownlint changes in this PR
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
# lint_modified_markdown_files runs the linter only if changes have been made to any md files. | ||
function lint_modified_markdown_files() { | ||
local markdown_files="$(git diff --name-only | grep \.md$)" | ||
for f in $markdown_files; do | ||
markdownlint "${f}" --fix | ||
done | ||
} | ||
|
||
lint_modified_markdown_files |