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

Document .ignore (was: ripgrep-specific ignore file) #1284

Closed
SimonSapin opened this issue May 24, 2019 · 2 comments
Closed

Document .ignore (was: ripgrep-specific ignore file) #1284

SimonSapin opened this issue May 24, 2019 · 2 comments
Labels
doc An issue with or an improvement to documentation. question An issue that is lacking clarity on one or more points.

Comments

@SimonSapin
Copy link

SimonSapin commented May 24, 2019

Only after I finished typing in full a feature request (preserved below) did I find out about .ignore files by reading other issues suggested by GitHub.

Since that name is hard to look up in a search engine, I’m not sure what other tools also consider .ignore by default and whether I wouldn’t want that for some use cases. What other tools do you know of that do?

What do you think could be ways to more prominently document .ignore?


Feature request for .rgignore

What version of ripgrep are you using?

ripgrep 11.0.1
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)

How did you install ripgrep?

cargo install

What operating system are you using ripgrep on?

Ubuntu 18.04

Describe your question, feature request, or bug.

Some code repositories contain generated files (with long lines) that should be excluded from being searched by ripgrep. Currently this can be done by adding a pattern to .gitignore, but this of course also makes the files ignored by git.

It would be nice to have a file, possibly named .rgignore, that lists patterns to be ignored by ripgrep but not by version control systems.

If this is a bug, what are the steps to reproduce the behavior?

git clone https://github.com/rust-lang/rust
cd rust
rg ptr::NonNull

If this is a bug, what is the actual behavior?

The console is flooded with the entire contents of src/tools/rls/rls-analysis/test_data/rust-analysis/libcore-a5db6a3445116c08.json, which is a 3 MB single-line JSON file.

If this is a bug, what is the expected behavior?

The repository maintainers should have a way to specify that ``src/tools/rls/rls-analysis/test_data/rust-analysis/*.json` should be excluded from ripgrep results by default.

@BurntSushi
Copy link
Owner

It's also described in the guide: https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#automatic-filtering

We could change .gitignore to .gitignore/.ignore/.rgignore in this section? https://github.com/BurntSushi/ripgrep/blob/d1e4d28f3/README.md#why-should-i-use-ripgrep Otherwise I'm not sure. The README is just meant to give a high level overview.

@BurntSushi BurntSushi added question An issue that is lacking clarity on one or more points. doc An issue with or an improvement to documentation. labels May 24, 2019
@SimonSapin
Copy link
Author

SimonSapin commented May 24, 2019

TIL about the guide, thanks!

Yes, I think that change would be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc An issue with or an improvement to documentation. question An issue that is lacking clarity on one or more points.
Projects
None yet
Development

No branches or pull requests

2 participants