Skip to content

Commit 60ff8c9

Browse files
authored
Merge pull request #91 from maryamtahhan/hotfix-markdown-linting
hotfix: fix 701fdcd
2 parents 701fdcd + 2dd7630 commit 60ff8c9

File tree

4 files changed

+93
-14
lines changed

4 files changed

+93
-14
lines changed

.github/workflows/markdown.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Markdown Quality Checks
3+
4+
on:
5+
pull_request:
6+
7+
jobs:
8+
run-quality-checks:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
15+
- uses: tj-actions/changed-files@v44
16+
id: changed-markdown-files
17+
with:
18+
files: '**/*.md'
19+
separator: ","
20+
21+
- name: Lint Markdown files
22+
uses: DavidAnson/markdownlint-cli2-action@v16
23+
if: steps.changed-markdown-files.outputs.any_changed == 'true'
24+
with:
25+
globs: ${{ steps.changed-markdown-files.outputs.all_changed_files }}
26+
config: '.markdownlint.json'
27+
fix: true
28+
separator: ","
29+
continue-on-error: false

.markdownlint.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"code-block-style": {
3+
"style": "fenced"
4+
},
5+
"code-fence-style": {
6+
"style": "backtick"
7+
},
8+
"heading-style": {
9+
"style": "atx"
10+
},
11+
"hr-style": {
12+
"style": "---"
13+
},
14+
"line-length": {
15+
"strict": false,
16+
"code_blocks": false
17+
},
18+
"proper-names": {
19+
"code_blocks": false,
20+
"names": [
21+
"Markdown",
22+
"markdown-it",
23+
"markdownlint",
24+
"markdownlint-cli2"
25+
]
26+
},
27+
"strong-style": {
28+
"style": "asterisk"
29+
},
30+
"table-pipe-style": {
31+
"style": "leading_and_trailing"
32+
},
33+
"ul-style": {
34+
"style": "dash"
35+
},
36+
"no-duplicate-header" : {
37+
"allow_different_nesting": true
38+
},
39+
"MD033" : false,
40+
"MD041": false,
41+
"MD045": false,
42+
"MD025": {
43+
"front_matter_title": ""
44+
}
45+
}

.pre-commit-config.yaml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,14 @@ repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
55
rev: v2.3.0
66
hooks:
7-
- id: check-yaml
8-
- id: end-of-file-fixer
9-
- id: trailing-whitespace
10-
#- repo: https://github.com/markdownlint/markdownlint.git
11-
# rev: v0.13.0
12-
# hooks:
13-
#- id: markdownlint_docker
14-
#name: Markdownlint Docker
15-
#description: Run markdown lint on your Markdown files using the project docker image
16-
#language: docker_image
17-
#files: \.(md|mdown|markdown)$
18-
#entry: markdownlint/markdownlint
7+
- id: check-yaml
8+
- id: end-of-file-fixer
9+
- id: trailing-whitespace
10+
- repo: https://github.com/DavidAnson/markdownlint-cli2
11+
rev: v0.9.2
12+
hooks:
13+
- id: markdownlint-cli2-rules-docker
1914
- repo: https://github.com/shellcheck-py/shellcheck-py
2015
rev: v0.10.0.1
2116
hooks:
22-
- id: shellcheck
17+
- id: shellcheck

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ cluster to be used for development or integration tests. It is also used in
1212
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/)
1313
- [kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installing-from-release-binaries)
1414
- [Git](https://git-scm.com/)
15+
- OPTIONAL: [pre-commit](https://pre-commit.com/)
1516

1617
Please install the same version of `kubectl` and `kind` as Github-hosted runner.
1718

@@ -37,7 +38,8 @@ Will setup container runtime on your host instance.
3738

3839
## Startup
3940

40-
**note**: in 2024 July, we decoupled cluster config with kind cluster setup, so that we allow this repo to set up a existing cluster.
41+
> **_Note_**: in 2024 July, we decoupled cluster config with kind cluster setup,
42+
so that we allow this repo to set up a existing cluster.
4143

4244
1. Modify kind [config](./kind/manifests/kind.yml) to make sure `extraMounts:` cover
4345
the linux header and BCC.
@@ -135,3 +137,11 @@ To run pre-commit manually
135137
```bash
136138
pre-commit run --all-files
137139
```
140+
141+
To skip pre-commit checks, use the `--no-verify` flag when committing changes
142+
143+
```bash
144+
git commit -m "test" --no-verify
145+
[precommit-shellcheck-mardown 89ed1adc] test
146+
1 file changed, 1 insertion(+), 1 deletion(-)
147+
```

0 commit comments

Comments
 (0)