Skip to content

New setting: per-file-ignores to ignores specific words into specific files #3673

@un-pogaz

Description

@un-pogaz

I recently discorve codespell and it was a great one, particularly in so far as I am not fluent in English.

However, after experimenting on various projects, I strongly suggest adding a feature per-file-ignores to ignores specific words into specific files. This would give finer control over the errors returned by codespell, as we sometimes use some variable names which are flag by codespell, but we don't want to exclude them globally they could really be a legitimate typo error in others context.

The toml configuration would look like this:

[codespell]
[codespell.per-file-ignores]
"file1" = "word1,word1"
"file2" = [
  "word3",
  "word4",
]

The inline/command format will be a bit more like that:

codespell  --per-file-ignores "file1:[word1,word2],file2:[word3,word4]"

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