Skip to content

Commit

Permalink
feat: implement markdown check in check target
Browse files Browse the repository at this point in the history
  • Loading branch information
bkioshn committed Dec 1, 2023
1 parent ead76a1 commit 0ab7f2e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ FROM debian:stable-slim
markdown-check:
# Check Markdown in this repo.
LOCALLY
DO ./earthly/mdlint+MDLINT_LOCALLY --src=$(echo ${PWD})

# Check Markdown
check-markdown:
DO ./earthly/mdlint+MDLINT_LOCALLY --src=$(echo ${PWD})

markdown-check-fix:
Expand All @@ -22,6 +25,9 @@ spell-check:

DO ./earthly/cspell+CSPELL_LOCALLY --src=$(echo ${PWD})

check:
BUILD +check-markdown

repo-docs:
# Create artifacts of extra files we embed inside the documentation when its built.
FROM scratch
Expand Down
10 changes: 5 additions & 5 deletions earthly/mdlint/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ MDLINT_LOCALLY:
# Run the linter with the given arguments, and recursively check all markdown files.
# The directory to be checked `MUST` have a `.markdownlint-sli2.jsonc` file.
# cspell: words davidanson
RUN docker run \
--rm \
-v $src:/workdir \
davidanson/markdownlint-cli2-rules:v0.10.0 \
FROM davidanson/markdownlint-cli2-rules:v0.10.0
WORKDIR /work
COPY . .
RUN markdownlint-cli2 \
"**/*.md" \
--config $cfg_file \
$fix
$fix

# A Test and example invocation of the above UDC.
mdlint-test:
Expand Down

0 comments on commit 0ab7f2e

Please sign in to comment.