Skip to content

The value of "--interactive" is not restricted #3341

Closed
@MercuryDemo

Description

@MercuryDemo

There is no restriction on the value of the interactive model entered by the user, but when the codespell is running, it only supports four types of interactive models, 0, 1, 2 and 3.

When other values are entered, the way of interaction will be confused. Here are some examples:

% codespell code.c -i 0 -w 
code.c:16: buring ==> burying, burning, burin, during
FIXED: code.c
% codespell code.c -i 10 -w
    fd = opem("/tmp/a", O_RDONLY);
 Choose an option (blank for none):  0) open: 0
    // buring your cpu
 Choose an option (blank for none):  0) burying 1) burning 2) burin 3) during: 0
FIXED: code.c
% codespell code.c -i 20 -w
code.c:16: buring ==> burying, burning, burin, during
FIXED: code.c
% codespell code.c -i -1 -w
FIXED: code.c

-i 20 and -i 0 give the same result, -i 10 and -i 2 give the same result, and -i -1 gives a different result from all the others.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions