Skip to content

Enhance ignoreErrors formats (multiple messages, reportUnmatched for individual messages) #7876

@MartinMystikJonas

Description

@MartinMystikJonas

Feature request

I suggest two improvements for ignoreErrors config.

  1. Allow to set multiple messages in one block. This could greatly simplify ignoreErros when sets of errors are relevant only for given set of files.
ignoreErrors:
  -
    messages:
      - "#message1#"
      - "#message2#"
      - "#message3#"
    paths:
      - dir1
      - dir2
      - dir3
  1. Option reportUnmatchedIgnoredErrors is now all or nothing. BUt in our projects we often have some general error patterns that can be ignored globally and we do not need ot check if they are unmatched and then we have individual ignores that we want to know if they are unmatched. I suggest to add option reportUnmatched to entries in ignoreErrors that can override report unmatched behaviour for given entry.
ignoreErrors:
  -
    message: "#message#"
    reportUnmatched: false # entry will not be reported as unmatched even with reportUnmatchedIgnoredErrors: true
ignoreErrors:
  -
    message: "#message#"
    reportUnmatched: true # entry will be reported as unmatched even with reportUnmatchedIgnoredErrors: false

What do you thinkabout these suggestions?

I you like them I believe I can prepere PR with them implemented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions