Compare commits

...

15 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
Andrew Gallant
fe97c0a152 ignore-0.4.20 2023-01-15 08:21:02 -05:00
Christian Vallentin
826f3fad5b ignore/api: add Clone and Debug impls for OverrideBuilder
PR #2397
2023-01-15 08:16:27 -05:00
Andrew Gallant
bc55049327 readme: update MSRV in README
... this was apparently long outdated, wow.
2023-01-05 12:09:46 -05:00
Andrew Gallant
d58e9353fc deps: update to grep 0.2.11 2023-01-05 09:13:47 -05:00
Andrew Gallant
ca60fef4db grep-0.2.11 2023-01-05 09:12:49 -05:00
Andrew Gallant
a25307d6c8 deps: update to grep-printer 0.1.7 2023-01-05 09:12:37 -05:00
Andrew Gallant
b80947a8b3 grep-printer-0.1.7 2023-01-05 09:11:16 -05:00
Andrew Gallant
ad793a0d8f deps: update to grep-searcher 0.1.11 2023-01-05 09:07:49 -05:00
10 changed files with 29 additions and 16 deletions

6
Cargo.lock generated
View File

@@ -152,7 +152,7 @@ dependencies = [
[[package]] [[package]]
name = "grep" name = "grep"
version = "0.2.10" version = "0.2.12"
dependencies = [ dependencies = [
"grep-cli", "grep-cli",
"grep-matcher", "grep-matcher",
@@ -197,7 +197,7 @@ dependencies = [
[[package]] [[package]]
name = "grep-printer" name = "grep-printer"
version = "0.1.6" version = "0.1.7"
dependencies = [ dependencies = [
"base64", "base64",
"bstr", "bstr",
@@ -248,7 +248,7 @@ dependencies = [
[[package]] [[package]]
name = "ignore" name = "ignore"
version = "0.4.19" version = "0.4.20"
dependencies = [ dependencies = [
"crossbeam-channel", "crossbeam-channel",
"globset", "globset",

View File

@@ -43,7 +43,7 @@ members = [
[dependencies] [dependencies]
bstr = "1.1.0" bstr = "1.1.0"
grep = { version = "0.2.8", path = "crates/grep" } grep = { version = "0.2.11", path = "crates/grep" }
ignore = { version = "0.4.19", path = "crates/ignore" } ignore = { version = "0.4.19", path = "crates/ignore" }
lazy_static = "1.1.0" lazy_static = "1.1.0"
log = "0.4.5" log = "0.4.5"

View File

@@ -343,7 +343,7 @@ $ pkgman install ripgrep_x86
If you're a **Rust programmer**, ripgrep can be installed with `cargo`. If you're a **Rust programmer**, ripgrep can be installed with `cargo`.
* Note that the minimum supported version of Rust for ripgrep is **1.34.0**, * Note that the minimum supported version of Rust for ripgrep is **1.65.0**,
although ripgrep may work with older versions. although ripgrep may work with older versions.
* Note that the binary may be bigger than expected because it contains debug * Note that the binary may be bigger than expected because it contains debug
symbols. This is intentional. To remove debug symbols and therefore reduce symbols. This is intentional. To remove debug symbols and therefore reduce
@@ -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.10" #: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.
@@ -17,9 +17,9 @@ edition = "2018"
grep-cli = { version = "0.1.7", path = "../cli" } grep-cli = { version = "0.1.7", path = "../cli" }
grep-matcher = { version = "0.1.6", path = "../matcher" } grep-matcher = { version = "0.1.6", path = "../matcher" }
grep-pcre2 = { version = "0.1.6", path = "../pcre2", optional = true } grep-pcre2 = { version = "0.1.6", path = "../pcre2", optional = true }
grep-printer = { version = "0.1.6", path = "../printer" } grep-printer = { version = "0.1.7", path = "../printer" }
grep-regex = { version = "0.1.11", path = "../regex" } grep-regex = { version = "0.1.11", path = "../regex" }
grep-searcher = { version = "0.1.10", path = "../searcher" } grep-searcher = { version = "0.1.11", path = "../searcher" }
[dev-dependencies] [dev-dependencies]
termcolor = "1.0.4" termcolor = "1.0.4"

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

@@ -1,6 +1,6 @@
[package] [package]
name = "ignore" name = "ignore"
version = "0.4.19" #:version version = "0.4.20" #:version
authors = ["Andrew Gallant <jamslam@gmail.com>"] authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = """ description = """
A fast library for efficiently matching ignore files such as `.gitignore` A fast library for efficiently matching ignore files such as `.gitignore`

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"]),

View File

@@ -106,6 +106,7 @@ impl Override {
} }
/// Builds a matcher for a set of glob overrides. /// Builds a matcher for a set of glob overrides.
#[derive(Clone, Debug)]
pub struct OverrideBuilder { pub struct OverrideBuilder {
builder: GitignoreBuilder, builder: GitignoreBuilder,
} }

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "grep-printer" name = "grep-printer"
version = "0.1.6" #:version version = "0.1.7" #:version
authors = ["Andrew Gallant <jamslam@gmail.com>"] authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = """ description = """
An implementation of the grep crate's Sink trait that provides standard An implementation of the grep crate's Sink trait that provides standard
@@ -22,7 +22,7 @@ serde1 = ["base64", "serde", "serde_json"]
base64 = { version = "0.20.0", optional = true } base64 = { version = "0.20.0", optional = true }
bstr = "1.1.0" bstr = "1.1.0"
grep-matcher = { version = "0.1.6", path = "../matcher" } grep-matcher = { version = "0.1.6", path = "../matcher" }
grep-searcher = { version = "0.1.8", path = "../searcher" } grep-searcher = { version = "0.1.11", path = "../searcher" }
termcolor = "1.0.4" termcolor = "1.0.4"
serde = { version = "1.0.77", optional = true, features = ["derive"] } serde = { version = "1.0.77", optional = true, features = ["derive"] }
serde_json = { version = "1.0.27", optional = true } serde_json = { version = "1.0.27", optional = true }