mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 01:05:55 +03:00
[GH-ISSUE #1010] MD007 when MD010 disabled #2438
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#2438
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 @Malix-Labs on GitHub (Oct 17, 2023).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1010
Fix
Subject
MD007 when MD010 disabled
Object
When MD010 is disabled (hard tabs use case), it should be:
MD007.indent = 1andMD007.start_indent = 1by default@DavidAnson commented on GitHub (Oct 17, 2023):
Just because tabs are allowed in a project does not mean they will/should be used for lists. Although I think that could be specified via a parameter to the rule.
@Malix-Labs commented on GitHub (Oct 17, 2023):
Comment Reply from @DavidAnson:
Disagree
It's a convention to normalize the indentation style project-wise
If MD010 is disabled, it means that the project is enforcing a tab style indentation
Tab style indentation => 1 tab / indentation
@DavidAnson commented on GitHub (Oct 17, 2023):
With very few exceptions, rules do not change their behavior based on how other rules are configured. This project prefers spaces and provides rule MD010 to help enforce that. Disabling MD010 does not introduce a requirement to use tabs. As the specification outlines, the behavior of tab stops is not always intuitive (https://spec.commonmark.org/0.30/#tabs).
It sounds like adding the parameter I propose above would satisfy your scenario.
@Malix-Labs commented on GitHub (Oct 17, 2023):
Comment Reply from @DavidAnson:
Do you mean that disabling MD010 does remove the requirement to not use hard tabs, rather that induce the requirement to use tabs?
Comment Reply from @DavidAnson:
If previous point is true, then agreed
@DavidAnson commented on GitHub (Oct 18, 2023):
Correct: MD010 will warn about tabs when it is enabled, but will do nothing when it is disabled.