mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-26 01:36:03 +03:00
[GH-ISSUE #450] File containing markdownlint-disable-file still runs rules #372
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#372
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 @pxl9588 on GitHub (Oct 25, 2021).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/450
I have a custom rule set with the tag 'readmeValidator', one of the rules throws an error on line 5. Using the README.md below I get an exception because line 5 does not exist.
I expected this file to be ignored completely by rules tagged with readmeValidator but that isn't the case.
@DavidAnson commented on GitHub (Oct 25, 2021):
Yes, disabled rules run when present - it's the output that's disabled. In this particular case, that's not strictly necessary, but in general disabling a rule for part of a file still requires running that rule on the rest of the file. For simplicity and consistency, configured rules run on all input and their output is filtered according to inline comments like this one.
What you probably want to do is fix that rule so it works rather than trying to disable it everywhere it breaks.
.markdownlintrcconfig files #2163