feat: add markdownlint for md documents#1417
Conversation
|
Welcome @Flying-Tom! It looks like this is your first PR to kmesh-net/kmesh 🎉 |
There was a problem hiding this comment.
Pull Request Overview
Adds markdownlint step to hack/format.sh for linting Markdown files, and tightens quoting on install commands and format tool invocations.
- Quote install tool arguments for safety
- Correct formatting commands to operate on the intended directory
- Introduce a Docker-based Markdown linting step
Comments suppressed due to low confidence (2)
hack/format.sh:29
- The
gofmtcommand now only formats files inhack/rather than the repository root. If the intent is to format the entire project, revert togofmt -w -s ..or adjust the working directory before running this command.
gofmt -w -s ./
hack/format.sh:33
- Similar to
gofmt,shfmtnow only formats thehack/directory. To ensure shell scripts across the project are formatted, consider targeting the repo root (e.g.,../) or changing into the root directory first.
shfmt -w -s -ln=bash ./
a94e5c9 to
f5c6488
Compare
|
i think it is only checking not formatting the files |
Yes, becaused there are so many problems so there are no fix currently. After more discussion, I will proceed on it. |
|
ok |
Signed-off-by: Tom <yusencao@outlook.com>
9d9639b to
cc3bb34
Compare
|
Doc generated by |
Codecov ReportAll modified and coverable lines are covered by tests ✅
see 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
.PHONY: gen generation happens first then format, so it should also format generated files @Flying-Tom |
I thought that is the problem, the documents generated violates some lint rules, and disabling them in From another perspective, I don't think markdown format(actually lint) is neccessary in CI, unless insisting on the check of markdown documents in CI. The CI does't upload any files or update the repo, it only perform the lint check, not the reformat. I prefer to use |
|
we use |
I think markdown format(lint) may be needed actually, but should not be int the big CI. There can be another CI, just like |
Signed-off-by: Tom <yusencao@outlook.com>
Signed-off-by: Tom <yusencao@outlook.com>
Signed-off-by: Tom <yusencao@outlook.com>
Signed-off-by: Tom <yusencao@outlook.com>
Signed-off-by: Tom <yusencao@outlook.com>
Signed-off-by: Tom <yusencao@outlook.com>
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hzxuzhonghu The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind enhancement
What this PR does / why we need it:
use markdownlint(docker version) to lint markdown documents.
Which issue(s) this PR fixes:
Fixes #1331
Special notes for your reviewer:
Does this PR introduce a user-facing change?: