Skip to content

dox_style: Using exclude with a string leads to unexpected results #47

@jan-bruckner

Description

@jan-bruckner

An exclude that uses a string (instead of a list containing one or multiple strings) can lead to unexpected results.

In the following example, each character of the string is treated as a separate exclusion pattern. Thus, an exclusion pattern '*' exists which leads to all modules being excluded from the check instead of just the module module-name:

stylecheck = {
    'top_level_modulename': {'exclude': '**/module-name/**'}
}

The correct way to achieve exclusion of only module-name is:

stylecheck = {
    'top_level_modulename': {'exclude': ['**/module-name/**']}
}

I think this should be detected/prevented. Maybe only lists should be allowed as value for the exclude key?

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