mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 17:26:22 +03:00
[GH-ISSUE #330] Add fixInfo for MD022 #285
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#285
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 @nschonni on GitHub (Sep 19, 2020).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/330
It seems like this one should be "fixable". Not sure if you already looked at it and ruled it out because of some edge cases
@DavidAnson commented on GitHub (Sep 19, 2020):
MD022 should include fix info for all scenarios it flags as an error: https://github.com/DavidAnson/markdownlint/blob/main/lib/md022.js
Is that not working or did you mean a different rule?
@nschonni commented on GitHub (Sep 20, 2020):
Sorry, I think i'm actually hitting a small bug between cli and cli2.
I was running it against dotnet/docs to try out the fix for that one. cli returns 5K+ changed files, and CLI2 returned ~4K files.
I was getting mixed up because CLI2 was returning errors into the console in addition to some fixed files
@DavidAnson commented on GitHub (Sep 20, 2020):
Can you describe the difference or give an example or the commands to reproduce this?
@nschonni commented on GitHub (Sep 20, 2020):
Sure, here is the steps:
.markdownlint.jsonmarkdownlint "**/*.md" --fix.markdownlint.jsonMD022 supressionmarkdownlint-cli2 "**/*.md" --fix@DavidAnson commented on GitHub (Sep 20, 2020):
At the risk of nitpicking, "--fix" is not a command line argument for CLI2; I assume you are setting
fix:truein its options file? I can try this and have a look.@nschonni commented on GitHub (Sep 20, 2020):
Nope, was just using the old config format. Not sure why CLI2 was updating the files then :P
@DavidAnson commented on GitHub (Sep 20, 2020):
I've never seen files get updated without
fix:true. If that's happening, please let me know how. The--fixargument should only seem like another file glob.@nschonni commented on GitHub (Sep 20, 2020):
I'll take a look tomorrow again when I'm on my other machine. Feel free to flip this issue over to the cli2 repo though, since it's not really related to the core lib anymore
@nschonni commented on GitHub (Sep 20, 2020):
You're right, I must have not reset the changes fully. I'll stick with the original CLI for the fixes since the config way is a little annoying when trying out fixes