From 71ee0765603f000a27954417da32c851640f106e Mon Sep 17 00:00:00 2001 From: bkioshn <35752733+bkioshn@users.noreply.github.com> Date: Thu, 7 Dec 2023 22:00:08 +0700 Subject: [PATCH 1/2] fix: clean up local markdown check (#125) * fix: remove local markdown check target * fix: delete markdown check github action file --- .github/workflows/markdown-check.yml | 20 -------------------- Earthfile | 6 ------ 2 files changed, 26 deletions(-) delete mode 100644 .github/workflows/markdown-check.yml diff --git a/.github/workflows/markdown-check.yml b/.github/workflows/markdown-check.yml deleted file mode 100644 index 4d25e3257..000000000 --- a/.github/workflows/markdown-check.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Markdown Check - -on: - workflow_call: - pull_request: - -jobs: - check-markdown: - name: Check if Markdown files are properly formatted. - runs-on: ubuntu-latest - env: - FORCE_COLOR: 1 - steps: - - uses: earthly/actions-setup@v1 - with: - version: v0.7.8 - - uses: actions/checkout@v4 - - - name: Check all markdown files are properly formatted - run: earthly -P +markdown-check diff --git a/Earthfile b/Earthfile index 767ca9166..604fbee59 100644 --- a/Earthfile +++ b/Earthfile @@ -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 From 3dd5518867b8b9ab51afe8ba781edc2eccd57b88 Mon Sep 17 00:00:00 2001 From: Apisit Ritreungroj <38898766+apskhem@users.noreply.github.com> Date: Thu, 7 Dec 2023 22:03:42 +0700 Subject: [PATCH 2/2] fix: remove local spellcheck targets (#123) Co-authored-by: Steven Johnson --- .github/workflows/spell-check.yml | 20 -------------------- Earthfile | 6 ------ docs/src/guides/spellcheck.md | 14 +------------- earthly/cspell/Earthfile | 27 +-------------------------- 4 files changed, 2 insertions(+), 65 deletions(-) delete mode 100644 .github/workflows/spell-check.yml diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml deleted file mode 100644 index 1e7fbfe14..000000000 --- a/.github/workflows/spell-check.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Spell Check - -on: - workflow_call: - pull_request: - -jobs: - publish: - name: Check if everything in the repo is spelled correctly. - runs-on: ubuntu-latest - env: - FORCE_COLOR: 1 - steps: - - uses: earthly/actions-setup@v1 - with: - version: v0.7.8 - - uses: actions/checkout@v4 - - - name: Check spelling of everything - run: earthly -P +spell-check diff --git a/Earthfile b/Earthfile index 604fbee59..56a27d3bd 100644 --- a/Earthfile +++ b/Earthfile @@ -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 diff --git a/docs/src/guides/spellcheck.md b/docs/src/guides/spellcheck.md index 81d7b74b9..053356e1a 100644 --- a/docs/src/guides/spellcheck.md +++ b/docs/src/guides/spellcheck.md @@ -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:+check-spelling + DO github.com/input-output-hk/catalyst-ci/earthly/cspell:+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. diff --git a/earthly/cspell/Earthfile b/earthly/cspell/Earthfile index a0f0f508d..294586b19 100644 --- a/earthly/cspell/Earthfile +++ b/earthly/cspell/Earthfile @@ -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 @@ -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}/../../)