Skip to content

Commit

Permalink
Merge branch 'master' into feat/rust-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenj authored Dec 7, 2023
2 parents 73871cb + 3dd5518 commit 6066554
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 91 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/markdown-check.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/spell-check.yml

This file was deleted.

12 changes: 0 additions & 12 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ FROM debian:stable-slim

# cspell: words livedocs sitedocs

# Check Markdown in this repo.
markdown-check:
LOCALLY

DO ./earthly/mdlint+MDLINT_LOCALLY --src=$(echo ${PWD})

# check-markdown can be done remotely.
check-markdown:
DO ./earthly/mdlint+CHECK
Expand All @@ -20,12 +14,6 @@ markdown-check-fix:

DO ./earthly/mdlint+MDLINT_LOCALLY --src=$(echo ${PWD}) --fix=--fix

# spell-check Check spelling in this repo locally.
spell-check:
LOCALLY

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

# check-spelling Check spelling in this repo inside a container.
check-spelling:
DO ./earthly/cspell+CHECK
Expand Down
14 changes: 1 addition & 13 deletions docs/src/guides/spellcheck.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,11 @@ In an Earthfile in your repo, add the following:

```earthfile
check-spelling:
DO github.com/input-output-hk/catalyst-ci/earthly/cspell:<tag>+check-spelling
DO github.com/input-output-hk/catalyst-ci/earthly/cspell:<tag>+CHECK
```

Executing `earthly +check-spelling` will automatically run the spell checking to all files in the repository.

### Run locally

```earthfile
spellcheck-lint:
# Check spelling in this repo.
LOCALLY
DO github.com/input-output-hk/catalyst-ci/earthly/cspell:t1.2.0+CSPELL_LOCALLY --src=$(echo ${PWD})
```

In this use case, the UDC is run Locally, so that the src in the repo can be directly checked.

## Configuration

Each repo will need a [`cspell.json`](https://cspell.org/configuration/) file in the root of the repo.
Expand Down
27 changes: 1 addition & 26 deletions earthly/cspell/Earthfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,6 @@
# cspell UDCs and Containers.
VERSION 0.7

CSPELL_LOCALLY:
# DO NOT RUN THIS UDC INSIDE CONTAINER BUILDS.
# IT IS NOT FOR CONTAINER BUILDS.
# See: https://github.com/earthly/earthly/issues/580

# Spell checking all docs and code is done with cspell
# See: cspell.org
COMMAND

# Where we want to run the `lint` from.
ARG --required src

# Unlikely to need to change this.
ARG cfg_file=cspell.json

RUN echo Spell Checking Recursively from: $src

RUN docker run \
--rm \
-v $src:/workdir \
ghcr.io/streetsidesoftware/cspell:8.0.0 \
lint . --dot

CHECK:
# Spell checking all docs and code is done with cspell
# See: cspell.org
Expand All @@ -44,8 +21,6 @@ CHECK:

# A Test and example invocation of the above UDC.
cspell-test:
# As notes above, this check must only be run locally.
LOCALLY
# Run with `earthly -P +cspell-test`
DO +CSPELL_LOCALLY --src=$(echo ${PWD}/../../)
DO +CHECK --src=$(echo ${PWD}/../../)

0 comments on commit 6066554

Please sign in to comment.