loeffel-io / ls-lint

An extremely fast directory and filename linter - Bring some structure to your project filesystem

Home Page:https://ls-lint.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to lint directory names with extensions without using a regex?

RaisinTen opened this issue · comments

I'm trying to lint the name of iconset directories. I was using snake case for all directory names, so previously my rule was:

ls:
  .dir: snake_case

but now that the project contains .iconset directories, I'm forced to use a regex like this:

ls:
  .dir: snake_case | regex:^[a-z]+(_[a-z]+)*\.iconset$

to make sure that the part before .iconset is in snake case.

I think it would be great if we can find a way to allow people to lint directory names just like filenames.

For now there are no plans to support this.
I'll leave that open to keep that in mind