Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warn on running -i without -w #2190

Closed
matkoniecz opened this issue Dec 7, 2021 · 4 comments
Closed

warn on running -i without -w #2190

matkoniecz opened this issue Dec 7, 2021 · 4 comments

Comments

@matkoniecz
Copy link
Contributor

I was a bit confused and needed to reread entire man page to spot that to have interactive editing (necessary to avoid editing .git folder) I need to enable not only -i

@matkoniecz matkoniecz changed the title warn on runnin -i without -w warn on running -i without -w Dec 7, 2021
@peternewman
Copy link
Collaborator

Why aren't you just skipping .git folders again?

I'd probably go further and -i should imply -w, as like you said, I can't see any reason to ask anything interactively if you aren't going to save the answers.

@matkoniecz
Copy link
Contributor Author

matkoniecz commented Dec 8, 2021

I'd probably go further and -i should imply -w, as like you said, I can't see any reason to ask anything interactively if you aren't going to save the answers.

+1

Why aren't you just skipping .git folders again?

I am running one big aliased filter on all my files at once.

As this is combination of multiple commands (including grep -v) I cannot apply -i -w to it, so I run codespell -i 3 (without -w so I become confused). Though the same would apply if there is large amount of typos, including some multiple selection ones and some possibly false positives.

@peternewman
Copy link
Collaborator

I'd probably go further and -i should imply -w, as like you said, I can't see any reason to ask anything interactively if you aren't going to save the answers.

+1

Actually found one possible reason not to in https://github.com/codespell-project/codespell/blob/ea9bfe3e13ca85addf0b0f65098ec3cbe99ef8d0/README.rst#usage

Not running with -w flag is the same as doing a dry run.

Why aren't you just skipping .git folders again?

I am running one big aliased filter on all my files at once.

As this is combination of multiple commands (including grep -v) I cannot apply -i -w to it, so I run codespell -i 3 (without -w so I become confused). Though the same would apply if there is large amount of typos, including some multiple selection ones and some possibly false positives.

I still don't really follow, but 🤷 . If you use things like find (if you can't use our skip directly) to generate a list of files to check, and then our skip options to avoid particular typos, it should probably be possible I'd imagine. Or just run codespell on each file/folder where you find typos.

@DimitriPapadopoulos
Copy link
Collaborator

Closed by #3340.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants