Compare commits

..

7 Commits

Author SHA1 Message Date
Andrew Gallant
e593f5b7ee grep-0.2.12 2023-05-16 13:12:45 -04:00
Andrew Gallant
6b19be2477 crates/grep: remove 'deny(missing_docs)'
This crate is only a shim over a bunch of other crates. I'm not sure
that there's anything to add to each of the `pub extern` items. So
instead of just writing fluff, I removed the lint.

Fixes #2516
2023-05-16 13:10:42 -04:00
Ryan Whitehouse
041544853c doc: fix --quiet docs
The wording was previously inverted, which had the opposite
meaning as was intended.

Fixes #1962
2023-03-28 07:22:59 -04:00
Manu
a7ae9e4043 ignore/types: add support for docker-compose files
Default file is docker-compose.yml and the documentation
mentions overrides in the form of docker-compose.*.yml.

PR #2469
2023-03-21 12:56:38 -04:00
Andrew Gallant
595e7845b8 readme: add a link to delta's support for ripgrep
Ref: https://github.com/BurntSushi/ripgrep/issues/86#issuecomment-1469717706
2023-03-15 08:02:04 -04:00
David Ringo
44fb9fce2c ignore/types: add *.sln for msbuild
.sln is the extension for Visual Studio Project Soltion files, one of
the file types accepted as inputs by MSBuild.

PR #2415
2023-02-09 21:20:49 -05:00
Vincent Bockaert
339c46a6ed ignore/types: enhance terraform default filter
The default filter for terraform only checks for *.tf files, but there
are quite few other terraform filetypes.

The explanation for all of them can be found below (including link to
documentation from Hashicorp at time of writing)

- *.tf.json & *.tfvars.json is to capture the files written in
  JSON-based variant of the Terraform language
    - https://developer.hashicorp.com/terraform/language/files
- *.tfvars is used to supply variables
    - https://developer.hashicorp.com/terraform/cloud-docs/workspaces/variables#6-auto-tfvars-variable-files
- .terraform.lock.hcl is used as a Dependency lock file
    - https://developer.hashicorp.com/terraform/language/files/dependency-lock
- terraform.rc & .terraformrc, *.tfrc
    - https://developer.hashicorp.com/terraform/cli/config/config-file

PR #2412
2023-02-09 12:57:01 -05:00
6 changed files with 19 additions and 7 deletions

2
Cargo.lock generated
View File

@@ -152,7 +152,7 @@ dependencies = [
[[package]] [[package]]
name = "grep" name = "grep"
version = "0.2.11" version = "0.2.12"
dependencies = [ dependencies = [
"grep-cli", "grep-cli",
"grep-matcher", "grep-matcher",

View File

@@ -430,6 +430,14 @@ $ cargo test --all
from the repository root. from the repository root.
### Related tools
* [delta](https://github.com/dandavison/delta) is a syntax highlighting
pager that supports the `rg --json` output format. So all you need to do to
make it work is `rg --json pattern | delta`. See [delta's manual section on
grep](https://dandavison.github.io/delta/grep.html) for more details.
### Vulnerability reporting ### Vulnerability reporting
For reporting a security vulnerability, please For reporting a security vulnerability, please

View File

@@ -2583,8 +2583,8 @@ Do not print anything to stdout. If a match is found in a file, then ripgrep
will stop searching. This is useful when ripgrep is used only for its exit will stop searching. This is useful when ripgrep is used only for its exit
code (which will be an error if no matches are found). code (which will be an error if no matches are found).
When --files is used, then ripgrep will stop finding files after finding the When --files is used, ripgrep will stop finding files after finding the
first file that matches all ignore rules. first file that does not match any ignore rules.
" "
); );
let arg = RGArg::switch("quiet").short("q").help(SHORT).long_help(LONG); let arg = RGArg::switch("quiet").short("q").help(SHORT).long_help(LONG);

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "grep" name = "grep"
version = "0.2.11" #:version version = "0.2.12" #:version
authors = ["Andrew Gallant <jamslam@gmail.com>"] authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = """ description = """
Fast line oriented regex searching as a library. Fast line oriented regex searching as a library.

View File

@@ -12,8 +12,6 @@ are sparse.
A cookbook and a guide are planned. A cookbook and a guide are planned.
*/ */
#![deny(missing_docs)]
pub extern crate grep_cli as cli; pub extern crate grep_cli as cli;
pub extern crate grep_matcher as matcher; pub extern crate grep_matcher as matcher;
#[cfg(feature = "pcre2")] #[cfg(feature = "pcre2")]

View File

@@ -60,6 +60,7 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
("dhall", &["*.dhall"]), ("dhall", &["*.dhall"]),
("diff", &["*.patch", "*.diff"]), ("diff", &["*.patch", "*.diff"]),
("docker", &["*Dockerfile*"]), ("docker", &["*Dockerfile*"]),
("dockercompose", &["docker-compose.yml", "docker-compose.*.yml"]),
("dts", &["*.dts", "*.dtsi"]), ("dts", &["*.dts", "*.dtsi"]),
("dvc", &["Dvcfile", "*.dvc"]), ("dvc", &["Dvcfile", "*.dvc"]),
("ebuild", &["*.ebuild"]), ("ebuild", &["*.ebuild"]),
@@ -160,6 +161,7 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
("motoko", &["*.mo"]), ("motoko", &["*.mo"]),
("msbuild", &[ ("msbuild", &[
"*.csproj", "*.fsproj", "*.vcxproj", "*.proj", "*.props", "*.targets", "*.csproj", "*.fsproj", "*.vcxproj", "*.proj", "*.props", "*.targets",
"*.sln",
]), ]),
("nim", &["*.nim", "*.nimf", "*.nimble", "*.nims"]), ("nim", &["*.nim", "*.nimf", "*.nimble", "*.nims"]),
("nix", &["*.nix"]), ("nix", &["*.nix"]),
@@ -251,7 +253,11 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
("tex", &["*.tex", "*.ltx", "*.cls", "*.sty", "*.bib", "*.dtx", "*.ins"]), ("tex", &["*.tex", "*.ltx", "*.cls", "*.sty", "*.bib", "*.dtx", "*.ins"]),
("texinfo", &["*.texi"]), ("texinfo", &["*.texi"]),
("textile", &["*.textile"]), ("textile", &["*.textile"]),
("tf", &["*.tf"]), ("tf", &[
"*.tf", "*.auto.tfvars", "terraform.tfvars", "*.tf.json",
"*.auto.tfvars.json", "terraform.tfvars.json", "*.terraformrc",
"terraform.rc", "*.tfrc", "*.terraform.lock.hcl",
]),
("thrift", &["*.thrift"]), ("thrift", &["*.thrift"]),
("toml", &["*.toml", "Cargo.lock"]), ("toml", &["*.toml", "Cargo.lock"]),
("ts", &["*.ts", "*.tsx", "*.cts", "*.mts"]), ("ts", &["*.ts", "*.tsx", "*.cts", "*.mts"]),