Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove local spellcheck targets #123

Merged
merged 2 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .github/workflows/spell-check.yml

This file was deleted.

6 changes: 0 additions & 6 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,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}/../../)