mattsb42-meta / not-grep

it's like grep, but different
Apache License 2.0
3 stars 5 forks source link

Is there a way to exclude two patterns for one glob? #46

Open YPCrumble opened 2 years ago

YPCrumble commented 2 years ago

Here's my not-grep.toml:

# The "include" checker will error unless the specified value is include.
[include]
# "src/**/*.py" = "__all__"

# The "exclude" checker will error if the specified value is include.
[exclude]
"**/*.py" = "super-with-arguments"
"**/*.py" = "redefined-outer-name"

☝️ this gives me a "duplicate keys" error...

# The "include" checker will error unless the specified value is include.
[include]
# "src/**/*.py" = "__all__"

# The "exclude" checker will error if the specified value is include.
[exclude]
"**/*.py" = [
    "super-with-arguments",
    "redefined-outer-name"
]

☝️ and this gives me an error that not-grep is looking for a string, not an array.

I'd be happy to help if the feature needs building, would love to hear what you think the best solution might be. I suspect the second version?

Thanks again for building this CI tool!