Skip to content

Feature: Ignore files not under version control #3300

@mdeweerd

Description

@mdeweerd

Context:
I created a script to add lines to the file ignore list that I can run if there are only false codespell positives.

I want to exclude files that are not under git version control as these do not need to be added as exceptions.

It seems appropriate and useful that 'codespell' has an option to do so.

For example, the following shell command filters to only files that are under version control:
git ls-files $(ls -p | grep -v -E '/$').

I could apply something like that to the script by using the codespell output two times or running it a second time on the filtered files. Done.

However, excluding files that are not under version controls seems like a good filter for codespell.

EDIT: updating the ignored lines file could even be a feature in codespell.

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