markdownlint icon indicating copy to clipboard operation
markdownlint copied to clipboard

Add a way to ignore directory or files

Open JJ opened this issue 5 years ago • 3 comments

Motivation

As an author, I want to be able to exclude files or directories in a per-file or repo-wide basis, so that I can focus my attention on errors reported on files that I am actually using.

There does not seem to be a way to exclude files or directories at the rule or at the file level. The use case is one in which this linter is added to a repository, and there are some files that are no longer used, but have not been deleted either. An "attic" kind of directory where those could be placed so that they are not linted would be a great addition.

Specification

  • A command that ignores files in .mdl.rb, or
  • YAML front matter for files that need to be ignored, or
  • a .lintignore file, following the implementation of .gitignore, for instance

Downstream Impact

Not sure, since there's no change over existing implementations.

JJ avatar Jan 11 '21 10:01 JJ

Duplicate of #167 I think

rfay avatar Feb 17 '21 23:02 rfay

Definitely related, except this one is a bit wider and the proposals are a bit more concrete.

JJ avatar Feb 18 '21 06:02 JJ

Definitely a duplicate of #167.

  • A command that ignores files in .mdl.rb, or

Probably .mldrc was meant?

  • YAML front matter for files that need to be ignored

CommonMark-compliant parsers will parse YAML front matter, unfortunately, otherwise this might be a good solution.

jamesquilty avatar Sep 14 '21 02:09 jamesquilty