don't markdownlint ignored files

I like to put a bunch of untracked stuff in a /scratch directory for
each project, and then puth /scratch in my global gitignore. There are
usually some markdown notes files in here that I don't care about style
for. The previous markdownlint invokation didn't respect the global
gitignore, making local 'engage' runs kinda useless due to false
positives from the scratch dir.
This commit is contained in:
Olivia Lee 2024-12-16 02:07:42 -08:00
parent 472f51c350
commit 4cc390345a
No known key found for this signature in database
GPG key ID: 54D568A15B9CD1F9
2 changed files with 7 additions and 1 deletions

View file

@ -48,7 +48,11 @@ script = "lychee --offline ."
[[task]]
name = "markdownlint"
group = "lints"
script = "markdownlint ."
# don't just use 'markdownlint .' because it will lint files that are ignored by
# git
script = """
git ls-files --cached --others --exclude-standard '*.md' | xargs markdownlint
"""
[[task]]
name = "cargo-fmt"