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

How to ignore files #290

Open
hanabi1224 opened this issue Jan 18, 2023 · 8 comments
Open

How to ignore files #290

hanabi1224 opened this issue Jan 18, 2023 · 8 comments
Assignees

Comments

@hanabi1224
Copy link

** Q: **

What are the CLI options or config fiels that I can use to ignore some .rs files, e.g. those auto-generated by protobuf, thanks!

@drahnr
Copy link
Owner

drahnr commented Jan 18, 2023

Generally, generated files should be put under OUT_DIR, which is excluded in .gitignore which is honoured. If you include files as part of your source tree, imho formatting makes sense. Assuming this is output of your build.rs, adding another line formatting it should work.

Would this be feasible or do you have a different use case?

@hanabi1224
Copy link
Author

Generally, generated files should be put under OUT_DIR

One counter-example is rust-libp2p is moving its protobuf generated files to source tree so that it won't require protoc to compile.

imho formatting makes sense.

It's not a formatting issue, but it has invalid words in its comments that are caught by cargo-spellcheck.

What I would like to have is sth like cargo-spellcheck --ignore [glob] --ignore [glob], just like cargo audit

Let me know if my explanations make sense

@drahnr
Copy link
Owner

drahnr commented Jan 18, 2023

It does make sense.

What do you think about a regex in the config file which could be part of the repository?

@hanabi1224
Copy link
Author

hanabi1224 commented Jan 18, 2023

Either way is good for me. Thanks for accepting this feature request!

btw, IMHO glob patterns would be better and easier than regular expressions

@jmintb
Copy link

jmintb commented Mar 12, 2023

Just bumping this, I have a CSS files with classes that I cannot change which would be nice to ignore.

@jmintb
Copy link

jmintb commented Mar 12, 2023

Happy to work on this if you think it makes sense for a first time contributor.

@jmintb
Copy link

jmintb commented Mar 12, 2023

Just bumping this, I have a CSS files with classes that I cannot change which would be nice to ignore.

Sorry I forgot that cargo-spell check is for documentation and comments, it was another tool complaining about the css,

@andreacfromtheapp
Copy link

+1 please

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

No branches or pull requests

4 participants