Skip to content

Flag path-like codes in diagnosticFilters #1384

@TwitchBronBron

Description

@TwitchBronBron

Now that #1060 merged, we should add some diagnostics to flag when the old style diagnosticFilters pattern looks like a file path instead of a code. This might not be 100% accurate (plugins could do some crazy codes if they wanted to), but it should help almost all the time.

This is going to be a challenge for projects that are trying to migrate from v0 to v1 because their diagnostic filters are no longer compatible.

For example:

{
    "diagnosticFilters": [
         "source/vendor/**/*",
    ]
}

Should be flagged because that is very clearly a glob, and those need to now be in the format:

{
    "diagnosticFilters": [{
        "files": [
            "source/vendor/**/*"
        ]
    }]
}

We could probably flag the following:

  • if there is a ./ or ../
  • if there is a globstar **
  • if there is a .bs or .brs or .xml file extension at the end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions