From ab320a695c84a2014370343833a90fef90289db9 Mon Sep 17 00:00:00 2001 From: Apisit Ritreungroj <38898766+apskhem@users.noreply.github.com> Date: Thu, 7 Dec 2023 15:32:00 +0700 Subject: [PATCH 1/2] fix: modify the spellcheck from local to call spellcheck in `catalyst-ci` (#177) * feat: spellcheck ci * feat: spell-check doc comment * fix: spell-check comment * chore: remove local spellcheck from workflow and earthfile --- .github/workflows/spell-check.yml | 14 -------------- .vscode/tasks.recommended.json | 4 ++-- Earthfile | 9 +++++---- 3 files changed, 7 insertions(+), 20 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 97bb1952fbb..00000000000 --- a/.github/workflows/spell-check.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Spell Check - -on: - pull_request: - types: - - opened - - edited - - synchronize - - reopened - -jobs: - build: - name: Check spelling across all files - uses: input-output-hk/catalyst-ci/.github/workflows/spell-check.yml@v2.0.6 diff --git a/.vscode/tasks.recommended.json b/.vscode/tasks.recommended.json index 997095658f1..8d8ddc315c7 100644 --- a/.vscode/tasks.recommended.json +++ b/.vscode/tasks.recommended.json @@ -40,9 +40,9 @@ { "label": "CI - Recursive Spell Check", "type": "shell", - "command": "earthly -P +spell-check", + "command": "earthly -P +check-spelling", "problemMatcher": { - "owner": "spell-check", + "owner": "check-spelling", "pattern": { "regexp": "([\\S+]+):(\\d+):(\\d+)\\s-\\s(.+)", "file": 1, diff --git a/Earthfile b/Earthfile index 8f3a1b382be..83d19faf6b2 100644 --- a/Earthfile +++ b/Earthfile @@ -17,11 +17,12 @@ markdown-check-fix: DO github.com/input-output-hk/catalyst-ci/earthly/mdlint:v2.0.9+MDLINT_LOCALLY --src=$(echo ${PWD}) --fix=--fix -spell-check: - # Check spelling in this repo. - LOCALLY +# check-spelling Check spelling in this repo inside a container. +check-spelling: + DO github.com/input-output-hk/catalyst-ci/earthly/cspell:v2.0.10+CHECK - DO github.com/input-output-hk/catalyst-ci/earthly/cspell:v2.0.9+CSPELL_LOCALLY --src=$(echo ${PWD}) +check: + BUILD +check-spelling repo-docs: # Create artifacts of extra files we embed inside the documentation when its built. From 9337c73bbf6615e4a9beec0345e2d15eb33ada55 Mon Sep 17 00:00:00 2001 From: bkioshn <35752733+bkioshn@users.noreply.github.com> Date: Thu, 7 Dec 2023 15:56:35 +0700 Subject: [PATCH 2/2] fix: modify the markdown check from local to call markdown check in `catalyst-ci` (#176) * fix: markdownlint-disable name for require-headings * fix: change markdown check local to remotely call check * chore: change name * ci: remove markdown-check in github action * fix: add check markdown to check target --------- Co-authored-by: Steven Johnson --- .github/workflows/markdown-check.yml | 14 -------------- .markdownlint.jsonc | 2 +- .vscode/tasks.recommended.json | 6 +++--- Earthfile | 15 +++++++-------- docs/src/appendix/important/coc.md | 2 +- docs/src/appendix/important/contributing.md | 2 +- docs/src/appendix/important/security.md | 2 +- 7 files changed, 14 insertions(+), 29 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 9895ac58dbf..00000000000 --- a/.github/workflows/markdown-check.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Markdown Check - -on: - pull_request: - types: - - opened - - edited - - synchronize - - reopened - -jobs: - build: - name: Check markdown files formatted consistently - uses: input-output-hk/catalyst-ci/.github/workflows/markdown-check.yml@v2.0.6 diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc index b58ef2a4d2d..a83548c0262 100644 --- a/.markdownlint.jsonc +++ b/.markdownlint.jsonc @@ -187,7 +187,7 @@ }, // MD042/no-empty-links - No empty links "MD042": true, - // MD043/required-headings/required-headers - Required heading structure + // MD043/required-headings/required-headings - Required heading structure "MD043": { // List of headings "headings": [ diff --git a/.vscode/tasks.recommended.json b/.vscode/tasks.recommended.json index 8d8ddc315c7..98225903460 100644 --- a/.vscode/tasks.recommended.json +++ b/.vscode/tasks.recommended.json @@ -4,9 +4,9 @@ { "label": "CI - Recursive Markdown Lint - Check", "type": "shell", - "command": "earthly -P +markdown-check", + "command": "earthly -P +check-markdown", "problemMatcher": { - "owner": "markdown-check", + "owner": "check-markdown", "pattern": { "regexp": "(\\S+):(\\d+):(\\d+)\\s(.+)", "file": 1, @@ -24,7 +24,7 @@ "type": "shell", "command": "earthly -P +markdown-check-fix", "problemMatcher": { - "owner": "markdown-check", + "owner": "markdown-check-fix", "pattern": { "regexp": "(\\S+):(\\d+):(\\d+)\\s(.+)", "file": 1, diff --git a/Earthfile b/Earthfile index 83d19faf6b2..17217947de1 100644 --- a/Earthfile +++ b/Earthfile @@ -5,17 +5,15 @@ FROM debian:stable-slim # cspell: words livedocs sitedocs -markdown-check: - # Check Markdown in this repo. - LOCALLY - - DO github.com/input-output-hk/catalyst-ci/earthly/mdlint:v2.0.9+MDLINT_LOCALLY --src=$(echo ${PWD}) +# check-markdown markdown check using catalyst-ci. +check-markdown: + DO github.com/input-output-hk/catalyst-ci/earthly/mdlint:v2.0.10+CHECK +# markdown-check-fix markdown check and fix using catalyst-ci. markdown-check-fix: - # Check Markdown in this repo. LOCALLY - DO github.com/input-output-hk/catalyst-ci/earthly/mdlint:v2.0.9+MDLINT_LOCALLY --src=$(echo ${PWD}) --fix=--fix + DO github.com/input-output-hk/catalyst-ci/earthly/mdlint:v2.0.10+MDLINT_LOCALLY --src=$(echo ${PWD}) --fix=--fix # check-spelling Check spelling in this repo inside a container. check-spelling: @@ -23,7 +21,8 @@ check-spelling: check: BUILD +check-spelling - + BUILD +check-markdown + repo-docs: # Create artifacts of extra files we embed inside the documentation when its built. FROM scratch diff --git a/docs/src/appendix/important/coc.md b/docs/src/appendix/important/coc.md index 20f13025910..ded021543ef 100644 --- a/docs/src/appendix/important/coc.md +++ b/docs/src/appendix/important/coc.md @@ -4,5 +4,5 @@ title: Code of Conduct --- - + {{ include_file('includes/repo/CODE_OF_CONDUCT.md') }} diff --git a/docs/src/appendix/important/contributing.md b/docs/src/appendix/important/contributing.md index fcce80fe558..2d893398545 100644 --- a/docs/src/appendix/important/contributing.md +++ b/docs/src/appendix/important/contributing.md @@ -3,5 +3,5 @@ icon: material/pen-plus --- - + {{ include_file('includes/repo/CONTRIBUTING.md') }} diff --git a/docs/src/appendix/important/security.md b/docs/src/appendix/important/security.md index fd86f01d61f..a33b9b349d4 100644 --- a/docs/src/appendix/important/security.md +++ b/docs/src/appendix/important/security.md @@ -3,5 +3,5 @@ icon: material/security --- - + {{ include_file('includes/repo/SECURITY.md') }}