Skip to content

Allow for regex in dictionaries #3632

Open
@spetrosi

Description

@spetrosi

I am considering using codespell to search for non-inclusive terms in our code. codespell has a built-in dictionary in https://github.com/codespell-project/codespell/blob/main/codespell_lib/data/dictionary_usage.txt.
However, codespell cannot search words from dictionary as a substring. For example, cosider this line:
timemaster is a program that uses ptp4l and phc2sys in combination with chronyd or ntpd to synchronize the system clock to NTP and PTP time masters.

Codespell would report the use of masters but it ignores timemaster.
I wonder if it is possible to allow passing regular expressions in the dictionary. So that I can add .*master.* to a dictionary and expect codespell to catch all strings that match that regex.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions