mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-27 10:16:20 +03:00
[GH-ISSUE #1136] MD013 : Issue with MarkdownLint Configuration Ignoring Line Length Exceeding 80 Words #620
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#620
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @DevSecOpsSohan on GitHub (Feb 22, 2024).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1136
I've encountered while configuring MarkdownLint to ignore line length exceeding 80 words. Despite following the official documentation's guidance, the line length issue persists, and I seek assistance in resolving it.
Here's the current configuration I've set up:
I've integrated this configuration into the pre-commit setup as follows:
Despite these settings, MarkdownLint continues to flag lines exceeding 80 characters, contrary to my intent to ignore this rule. I'm uncertain where the misconfiguration lies and would appreciate any guidance or adjustments you could provide to resolve this issue effectively.
@DavidAnson commented on GitHub (Feb 22, 2024):
The pre-commit configuration above is using "args" to say the YAML configuration file should be linted (and nothing else). You probably want to use the --config option and pass a glob like "**/*.md". Once that problem is fixed, the "ignores" override you have should no longer be necessary and the other configuration should be applied as expected.
@DevSecOpsSohan commented on GitHub (Feb 23, 2024):
@DavidAnson I have try to add the below configuration. Which you have suggested but after that also It is not ignoring the file
pre-commit-hook.yaml
markdownlint-cli2.yaml
Could you provide me the pre-commit hook config which I need to use in markdownlint-cli2 to ignore the line-length issue in table.
Error:
@DavidAnson commented on GitHub (Feb 23, 2024):
This tool shows what it's doing at the beginning of its output. You can see that in your bottom snippet as something that looks like this:
Finding: --config=extern/make/.config/.markdownlint-cli2.yaml .gitlab/issue_templates/Default.md ...That tells us the syntax for "--config" was wrong because "=" should not be used there. The pre-commit syntax you show above looks reasonable to me, but I do not use pre-commit. In my own smoke test for pre-commit integration, I use this syntax and it seems to behave as expected:
args: [--config, configuration/.markdownlint-cli2.jsonc]