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

Bug: The linter is not the same as the original repo #117

Open
hydai opened this issue Jun 27, 2023 · 11 comments · May be fixed by #175
Open

Bug: The linter is not the same as the original repo #117

hydai opened this issue Jun 27, 2023 · 11 comments · May be fixed by #175
Labels
bug Something isn't working

Comments

@hydai
Copy link
Member

hydai commented Jun 27, 2023

Describe the bug.

The original repo applied markdown-lint with a custom configuration file.

Configuration file

https://github.com/WasmEdge/WasmEdge/blob/master/.github/linters/.markdown-lint.yml

Just save it as .markdownlint.yaml.

---
###########################
###########################
## Markdown Linter rules ##
###########################
###########################

# Linter rules doc:
# - https://github.com/DavidAnson/markdownlint
#
# Copied from: https://github.com/github/super-linter/blob/main/TEMPLATES/.markdown-lint.yml
#
# Note:
# To comment out a single error:
#   <!-- markdownlint-disable -->
#   any violations you want
#   <!-- markdownlint-restore -->
#

###############
# Rules by id #
###############
MD004: false                  # Unordered list style
MD007:
  indent: 2                   # Unordered list indentation
MD013:
  line_length: 999            # Line length 80 is far to short. We allow soft wrapped paragraphs and raw code outputs
MD026:
  punctuation: ".,;:!。,;:"  # List of not allowed
MD029: false                  # Ordered list item prefix
MD033: false                  # Allow inline HTML
MD036: false                  # Emphasis used instead of a heading

#################
# Rules by tags #
#################
blank_lines: false  # Error on blank lines

Error log

markdownlint-cli2 v0.8.1 (markdownlint v0.29.0)
Finding: **/*.md
Linting: 285 file(s)
Summary: 97 error(s)
.github/PULL_REQUEST_TEMPLATE.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## Explanation"]
CONTRIBUTING.md:18 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "# <a name="contributing-flow">..."]
CONTRIBUTING.md:28 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
CONTRIBUTING.md:35:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ git commit -s -m “my commit ..."]
CONTRIBUTING.md:42 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
CONTRIBUTING.md:91:62 MD034/no-bare-urls Bare URL used [Context: "https://github.com/WasmEdge/do..."]
i18n/zh/docusaurus-plugin-content-docs/current/contribute/source/os/android/apk.md:7 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "# Call WasmEdge functions from..."]
i18n/zh/docusaurus-plugin-content-docs/current/contribute/source/os/android/apk.md:7 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "# Call WasmEdge functions from..."]
i18n/zh/docusaurus-plugin-content-docs/current/contribute/source/plugin/httpsreq.md:7 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "# Build WasmEdge With WasmEdge..."]
i18n/zh/docusaurus-plugin-content-docs/current/develop/build-and-run/cli.md:269 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "### Examples"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/build-and-run/docker_wasm.md:14:3 MD051/link-fragments Link fragments should be valid [Context: "[Create and run a node.js server](#create-and-run-a-node-js-server)"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/build-and-run/docker_wasm.md:21 MD045/no-alt-text Images should have alternate text (alt text)
i18n/zh/docusaurus-plugin-content-docs/current/develop/build-and-run/docker_wasm.md:32:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ docker buildx build --platfo..."]
i18n/zh/docusaurus-plugin-content-docs/current/develop/build-and-run/docker_wasm.md:75:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ docker push secondstate/rust..."]
i18n/zh/docusaurus-plugin-content-docs/current/develop/build-and-run/docker_wasm.md:102 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "### Build"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/build-and-run/docker_wasm.md:107:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ docker buildx build --platfo..."]
i18n/zh/docusaurus-plugin-content-docs/current/develop/build-and-run/docker_wasm.md:145 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "### Publish"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/build-and-run/docker_wasm.md:150:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ docker push secondstate/node..."]
i18n/zh/docusaurus-plugin-content-docs/current/develop/build-and-run/docker_wasm.md:171 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "### Further reading"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/build-and-run/docker_wasm.md:187 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "### Build"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/build-and-run/docker_wasm.md:192:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ docker compose up"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/build-and-run/docker_wasm.md:236:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ docker compose up"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/build-and-run/docker_wasm.md:241 MD045/no-alt-text Images should have alternate text (alt text)
i18n/zh/docusaurus-plugin-content-docs/current/develop/build-and-run/docker_wasm.md:279 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "### Further reading"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/c/simd.md:7 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "# WebAssembly SIMD Example in ..."]
i18n/zh/docusaurus-plugin-content-docs/current/develop/deploy/cri-runtime/containerd.md:23:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ curl -sSf https://raw.github..."]
i18n/zh/docusaurus-plugin-content-docs/current/develop/deploy/cri-runtime/containerd.md:24:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ sudo -E sh -c 'echo "$HOME/...."]
i18n/zh/docusaurus-plugin-content-docs/current/develop/deploy/cri-runtime/containerd.md:25:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ sudo ldconfig"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/deploy/intro.md:17 MD045/no-alt-text Images should have alternate text (alt text)
i18n/zh/docusaurus-plugin-content-docs/current/develop/deploy/intro.md:29 MD045/no-alt-text Images should have alternate text (alt text)
i18n/zh/docusaurus-plugin-content-docs/current/develop/deploy/kubernetes/knative.md:7 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "# Knative"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/deploy/kubernetes/knative.md:7 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "# Knative"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/deploy/podman.md:68 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "### Run A simple WASI app"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/getting-started/quick_start_docker.md:26 MD045/no-alt-text Images should have alternate text (alt text)
i18n/zh/docusaurus-plugin-content-docs/current/develop/getting-started/quick_start_redhat.md:25:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ dnf install wasmedge crun-wa..."]
i18n/zh/docusaurus-plugin-content-docs/current/develop/javascript/rust.md:170 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "### Run the example"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/ai_inference/openvino.md:19 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/ai_inference/openvino.md:52 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/ai_inference/openvino.md:59 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/ai_inference/pytorch.md:21 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/ai_inference/pytorch.md:53 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/ai_inference/pytorch.md:60 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/ai_inference/tensorflow_lite.md:19 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/ai_inference/tensorflow_lite.md:49 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/ai_inference/tensorflow_lite.md:56 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/ai_inference/tensorflow_lite.md:75:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ wasmedgec rust/tflite-bird/t..."]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/ai_inference/tensorflow_lite.md:76:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ wasmedge --dir .:. wasmedge-..."]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/dapr.md:11 MD045/no-alt-text Images should have alternate text (alt text)
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/dapr.md:28 MD045/no-alt-text Images should have alternate text (alt text)
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/dapr.md:75:1 MD010/no-hard-tabs Hard tabs [Column: 1]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/hello_world.md:55 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "### Build the WASM bytecode"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/hello_world.md:61 MD024/no-duplicate-heading/no-duplicate-header Multiple headings with the same content [Context: "### Run the application from c..."]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/http_service/client.md:17 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/http_service/client.md:26 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/http_service/client.md:41 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/http_service/client.md:57 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/http_service/client.md:78 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/http_service/client.md:86 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/http_service/client.md:102 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/http_service/client.md:117 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/http_service/client.md:138 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/http_service/client.md:145 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/http_service/client.md:160 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/http_service/client.md:182 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/http_service/server.md:28 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/http_service/server.md:35 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/http_service/server.md:65 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/setup.md:15 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/setup.md:23 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/setup.md:31 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/socket_networking/client.md:46 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/socket_networking/client.md:134 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/socket_networking/server.md:7:24 MD051/link-fragments Link fragments should be valid [Context: "[client](client) chapter, with the WasmEdge socket API, it is also possible for Rust developers to work directly on the socket level. In order for WasmEdge to become a cloud-native runtime for microservices, it needs to support HTTP servers. So, in this chapter, we will discuss[an HTTP server example](#an-http-server)"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/socket_networking/server.md:84 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/develop/rust/socket_networking/server.md:227 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/embed/c/reference/0.12.0.md:7 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "# WasmEdge C 0.12.0 API Docume..."]
i18n/zh/docusaurus-plugin-content-docs/current/embed/go/bindgen.md:193:48 MD026/no-trailing-punctuation Trailing punctuation in heading [Punctuation: '.']
i18n/zh/docusaurus-plugin-content-docs/current/embed/overview.md:14 MD045/no-alt-text Images should have alternate text (alt text)
i18n/zh/docusaurus-plugin-content-docs/current/embed/quick-start/install.md:21 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/embed/quick-start/install.md:42 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/embed/quick-start/install.md:64 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/embed/quick-start/wasm-app-in-rust.md:17 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
i18n/zh/docusaurus-plugin-content-docs/current/embed/rust/app.md:7:1 MD034/no-bare-urls Bare URL used [Context: "https://github.com/second-stat..."]
i18n/zh/docusaurus-plugin-content-docs/current/embed/rust/complex_data.md:7:27 MD034/no-bare-urls Bare URL used [Context: "https://github.com/second-stat..."]
i18n/zh/docusaurus-plugin-content-docs/current/embed/rust/function.md:7:1 MD034/no-bare-urls Bare URL used [Context: "https://github.com/second-stat..."]
i18n/zh/docusaurus-plugin-content-docs/current/embed/rust/function.md:9:1 MD034/no-bare-urls Bare URL used [Context: "https://github.com/second-stat..."]
i18n/zh/docusaurus-plugin-content-docs/current/embed/rust/intro.md:7 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "# WasmEdge Rust SDK"]
i18n/zh/docusaurus-plugin-content-docs/current/embed/rust/intro.md:21:7 MD051/link-fragments Link fragments should be valid [Context: "[`wasmedge-sdk` Examples](#wasmedge-sdk-examples)"]
i18n/zh/docusaurus-plugin-content-docs/current/embed/rust/intro.md:22:7 MD051/link-fragments Link fragments should be valid [Context: "[`wasmedge-sys` Examples](#wasmedge-sys-examples)"]
i18n/zh/docusaurus-plugin-content-docs/current/embed/witc.md:12:19 MD034/no-bare-urls Bare URL used [Context: "https://github.com/second-stat..."]
README.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "![WasmEdge Logo](https://githu..."]
README.md:5:178 MD034/no-bare-urls Bare URL used [Context: "https://wasmedge.org/docs/"]
README.md:29:138 MD034/no-bare-urls Bare URL used [Context: "http://localhost:3000/docs/"]
src/pages/releases.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "import Tabs from '@theme/Tabs'..."]
src/pages/talks.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "import ReactPlayer from 'react..."]
src/pages/talks.md:25 MD001/heading-increment/header-increment Heading levels should only increment by one level at a time [Expected: h3; Actual: h4]
src/pages/talks.md:51 MD001/heading-increment/header-increment Heading levels should only increment by one level at a time [Expected: h3; Actual: h4]

Describe the steps to reproduce the behavior.

Install markdownlint

npm install markdownlint-cli2 --global

Run markdwonlint with given configuration file

markdownlint-cli2 "**/*.md"

Expected behavior.

Let's refine the configuration file or apply markdown-lint to ensure all markdown files follow the same spec.

Screenshots.

No response

Operating Environment

ProductName:macOS ProductVersion:13.4.1 BuildVersion:22F82

Additional Information

No response

@hydai hydai added the bug Something isn't working label Jun 27, 2023
@q82419
Copy link
Collaborator

q82419 commented Jun 27, 2023

Seems like the build check on push and on PR are duplicated.

@alabulei1
Copy link
Collaborator

@adithyaakrishna Can you please take a look? Thanks.

@adithyaakrishna
Copy link
Contributor

@hydai We have a lint check which uses prettier and eslint for the project

@q82419 I will take a look at that as well 👀

@adithyaakrishna
Copy link
Contributor

@hydai
Copy link
Member Author

hydai commented Jul 3, 2023

Hi @adithyaakrishna
I think the current CI is not lint the markdown file.
The super-linter is removed in this PR: https://github.com/WasmEdge/docs/pull/109/files#diff-107e910e9f2ebfb9a741fa10b2aa7100cc1fc4f5f3aca2dfe78b905cbd73c0d2L24-L31

However, the eslint doesn't enable the markdown plugin.

@adithyaakrishna
Copy link
Contributor

Ohh that makes sense, does this workflow auto commits the changes as well?

@hydai
Copy link
Member Author

hydai commented Jul 3, 2023

No idea. We don't do auto commits in the main repo, but it should have if you use the markdown plugin with eslint.

@adithyaakrishna
Copy link
Contributor

Fixed and Updated in the above PR :)

@alabulei1
Copy link
Collaborator

alabulei1 commented Aug 24, 2023

Bug: The linter is not the same as the original repo
#117
The central problem discussed in the issue is that the linter used in the original repository is not the same as the one being used in the current repository. The issue highlights that the current CI is not linting the markdown files, and although the super-linter was removed, the eslint in use does not enable the markdown plugin. The main solution proposed is to update the eslint configuration to enable the markdown plugin. This solution has been acknowledged and addressed in a pull request.

        this result is generated by flows.network. Triggered by @WasmEdge

@anshikavashistha
Copy link

@alabulei1 What kind of enhancement do we need to do?

@hydai
Copy link
Member Author

hydai commented Aug 6, 2024

@alabulei1 What kind of enhancement do we need to do?

We should use a markdown linter in the workflow to detect the linting issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
5 participants