Skip to content

ignore words become case-insensitive if it is only lowercase. #3638

@fujitatomoya

Description

@fujitatomoya

according to https://github.com/codespell-project/codespell?tab=readme-ov-file#ignoring-words,

When ignoring false positives, note that spelling errors are case-insensitive but words to ignore are case-sensitive.

but the following example tells me that is not implemented when word to ignore is only with lowercase.

tomoyafujita@~/DVT/codespell >cat test.md 
ros2 should not be detected.
ROS2 should be detected.
tomoyafujita@~/DVT/codespell >cat dictionary.txt 
ROS2->ROS 2
tomoyafujita@~/DVT/codespell >codespell -D dictionary.txt,- test.md
test.md:1: ros2 ==> ros 2
test.md:2: ROS2 ==> ROS 2
tomoyafujita@~/DVT/codespell >codespell --ignore-words-list ros2 -D dictionary.txt,- test.md
tomoyafujita@~/DVT/codespell >codespell --ignore-words-list ROS2 -D dictionary.txt,- test.md
test.md:1: ros2 ==> ros 2

i believe this is unexpected behavior, at least it is not consistent with documentation above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions