Closed OlivierZal closed 3 months ago
The last published release of this project was on April 3, so the problem you report which showed up in the last week is unlikely to be related to this project unless you also changed versions and/or configuration in the last week.
The underlying commit that seems most relevant to what you report is the following, though the perimeter that that was removed is not the one you are using. I can't tell more without additional information from you, though.
https://github.com/DavidAnson/markdownlint/commit/f2725178b1e83b07d7f7cc2db64d42f6aa14b8a1
Here is another similar example when I regenerated a PR to bump from a rather older version recently https://github.com/canada-ca/ore-ero/pull/1885 That is using an different setting, but also the old file format/name https://github.com/canada-ca/ore-ero/blob/7145452d0e8f8326e0247aa9d8a9316837574226/.markdownlint.json#L4C4-L6
@nschonni, you are using CLI1 in that example, not CLI2 AND you are using the parameter name that was removed. So this is expected.
This passing test case shows the supported siblings_only parameter functioning as documented in relevant versions of the library: https://github.com/DavidAnson/markdownlint/blob/b2305efafb034b1f328845aec9928b5363ffd646/test/heading_duplicate_content_different_nesting.md
If someone has an example of this not working, please share the reproduction steps or repository.
I've also noticed the absence of recent release @DavidAnson: I can't explain why as for now, 8 just know it happens.
You're right, I just swapped the CLI and upgraded the config. Hiding my previous comment
@OlivierZal, please show how to reproduce the behavior you describe. Otherwise this issue is not actionable.
@DavidAnson, now I can explain.
If I turn siblings_only
to false
I get more errors:
README.md:19 MD024/no-duplicate-heading Multiple headings with the same content [Context: "#### Enumeration Members"]
README.md:35 MD024/no-duplicate-heading Multiple headings with the same content [Context: "#### Enumeration Members"]
README.md:52 MD024/no-duplicate-heading Multiple headings with the same content [Context: "#### Enumeration Members"]
README.md:88 MD024/no-duplicate-heading Multiple headings with the same content [Context: "#### Enumeration Members"]
README.md:102 MD024/no-duplicate-heading Multiple headings with the same content [Context: "#### Enumeration Members"]
README.md:117 MD024/no-duplicate-heading Multiple headings with the same content [Context: "#### Enumeration Members"]
README.md:131 MD024/no-duplicate-heading Multiple headings with the same content [Context: "#### Enumeration Members"]
README.md:143 MD024/no-duplicate-heading Multiple headings with the same content [Context: "#### Enumeration Members"]
README.md:201 MD024/no-duplicate-heading Multiple headings with the same content [Context: "###### Returns"]
...
So it's new to me because I added last week a lower level of headings, and the issue is that now it raises errors for ######
(and above) although it shouldn't.
About how to reproduce:
npm run docs
The first warning about getTile(select)
is correctly flagging a duplicate heading. There are 2 sections at the same level (siblings). They are trying to document the differences between select
being true and false, but the heading is the same for both
Yes @nschonni, but "siblings_only": true
should prevent from warning, that's the point. It works well for ####
and below but not for ######
and above.
No, it's a violation because there are duplicates that are siblings at the same heading level, with no breaking heading level between them. https://github.com/DavidAnson/markdownlint/blob/main/doc/md024.md
Nick is correct. All of the violations here are caused by similar groupings at the same heading level (6) as the section they are meant to be in. Everywhere else in the document, Parameters/Returns/Source are one heading level deeper than the section they correspond to. However, in both of the cases being reported, they are at the same level as the section they correspond to. This is probably because heading level 6 is already the maximum, however the rule is correct in flagging these as violations.
The rule is correct but I thought that setting siblings_only
to true
would have prevent from warning about level 6 in the same way than for level 4.
The README.md is automatically generated by typedoc, so I don't have so much control on it, I'll simply disable the entire rule.
So I close this task. Thanks for the explanations.
Hi @DavidAnson ,
The following
.markdownlint.jsonc
worked until last week:but now raises errors: