Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Default options in .pronto-blacklist.yml #6

Open
AJFaraday opened this issue Jul 13, 2023 · 0 comments
Open

Request: Default options in .pronto-blacklist.yml #6

AJFaraday opened this issue Jul 13, 2023 · 0 comments

Comments

@AJFaraday
Copy link

I recently had an issue where pronto blacklist read a new SVG file containing some binary image data, and produced a large number of errors:

app/webpack/images/renewal_discount/banner_image_desktop.svg:18 E: Do not use BUG
app/webpack/images/renewal_discount/banner_image_desktop.svg:18 E: Do not use WTF
app/webpack/images/renewal_discount/banner_image_desktop.svg:18 E: Do not use XXX
app/webpack/images/renewal_discount/banner_image_desktop.svg:18 E: Do not use BANG

Looking at the config, it looks like I can manually exclude each case like so:

blacklist:
  - BUG
options:
  BUG:
    exclude:
      - '*.svg'

The problem is, I'm adding quite a lot of exemptions like this and it's quite likely that anther SVG with this kind of binary string would produce new errors.

What I'd like to do is provide a default list of exclude config which is checked alongside the specific exception. Perhaps outside the options parameter so that it does not conflict with a specific case:

blacklist:
  - BUG
default_options:
  exclude:
    - '*.svg'
options:
  BUG:
    exclude:
      ...

I've had a quick look at the code, and there doesn't seem to be any way to do this, currently. Could this be added?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant