ongdisheng commented on code in PR #718:
URL: https://github.com/apache/fesod/pull/718#discussion_r2572812114


##########
website/.markdownlint-cli2.jsonc:
##########
@@ -1,5 +1,4 @@
 {
-  "globs": ["website/**/*.md"],

Review Comment:
   Yes, that's right. The CI will only check markdown files that were changed 
in the PR as I found that the globs field in the config file was merging with 
the action input. When I tested with just `website/test-markdown.md` as the 
input 
[here](https://github.com/ongdisheng/fesod/actions/runs/19767391754/job/56643422485),
 the linter actually found and checked 102 files instead of just that one file. 
The log showed it was linting both my input file and all files matching 
`website/**/*.md` from the config. Removing the globs field fixes this so only 
changed files get linted, which means existing lint errors in other files won't 
block new PRs. What do you think about this approach?
   
   _Note: Currently there are 15 linting errors in the markdown files in the 
repository._
   
   <details>
   <summary>Error details</summary>
   
   ```bash
   Finding: website/test-markdown.md website/**/*.md !**/node_modules/** 
!**/target/** !**/dist/**
   Linting: 102 file(s)
   Summary: 15 error(s)
   Error: website/docs/migration/from-fastexcel.md:47 
MD031/blanks-around-fences Fenced code blocks should be surrounded by blank 
lines [Context: "```xml"] 
https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md031.md
   Error: website/docs/migration/from-fastexcel.md:56 
MD031/blanks-around-fences Fenced code blocks should be surrounded by blank 
lines [Context: "```gradle"] 
https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md031.md
   Error: website/docs/migration/from-fastexcel.md:104 
MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: 
"- Update Maven/Gradle dependen..."] 
https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md
   Error: website/docs/migration/from-fastexcel.md:110 
MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: 
"- Progressively replace deprec..."] 
https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md
   Error: website/docs/migration/from-fastexcel.md:116 
MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: 
"- Remove all references to dep..."] 
https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md
   Error: website/docs/migration/from-fastexcel.md:121 
MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: 
"- Lower risk through increment..."] 
https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md
   Error: 
website/i18n/zh-cn/docusaurus-plugin-content-docs/current/migration/from-fastexcel.md:47
 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank 
lines [Context: "```xml"] 
https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md031.md
   Error: 
website/i18n/zh-cn/docusaurus-plugin-content-docs/current/migration/from-fastexcel.md:56
 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank 
lines [Context: "```gradle"] 
https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md031.md
   Error: 
website/i18n/zh-cn/docusaurus-plugin-content-docs/current/migration/from-fastexcel.md:104
 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: 
"- 将 Maven/Gradle 依赖更新为 Apache ..."] 
https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md
   Error: 
website/i18n/zh-cn/docusaurus-plugin-content-docs/current/migration/from-fastexcel.md:110
 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: 
"- 逐步将已废弃的类替换为 FesodSheet"] 
https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md
   Error: 
website/i18n/zh-cn/docusaurus-plugin-content-docs/current/migration/from-fastexcel.md:116
 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: 
"- 删除所有对已废弃类的引用"] 
https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md
   Error: 
website/i18n/zh-cn/docusaurus-plugin-content-docs/current/migration/from-fastexcel.md:121
 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: 
"- 通过增量更改降低风险"] 
https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md
   Error: website/test-markdown.md:1 MD041/first-line-heading/first-line-h1 
First line in a file should be a top-level heading [Context: "### This is h3 
without h1 firs..."] 
https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md041.md
   Error: website/test-markdown.md:5 MD040/fenced-code-language Fenced code 
blocks should have a language specified [Context: "```"] 
https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md040.md
   Error: website/test-markdown.md:9:38 MD047/single-trailing-newline Files 
should end with a single newline character 
https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md047.md
   Error: Failed with exit code: 1
   ```
   </details>



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to