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

Don't search in ignored files by default #137

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ struct MacheteArgs {
#[argh(switch)]
fix: bool,

/// respect ignore files (.gitignore, .ignore, etc.) when searching for files.
/// also search in ignored files (.gitignore, .ignore, etc.) when searching for files.
#[argh(switch)]
ignore: bool,
no_ignore: bool,

/// print version.
#[argh(switch)]
Expand Down Expand Up @@ -138,7 +138,7 @@ fn run_machete() -> anyhow::Result<bool> {
&path,
CollectPathOptions {
skip_target_dir: args.skip_target_dir,
respect_ignore_files: args.ignore,
respect_ignore_files: !args.no_ignore,
},
) {
Ok(entries) => entries,
Expand Down
2 changes: 1 addition & 1 deletion src/search_unused.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ fn make_multiline_regexp(name: &str) -> String {
// Syntax documentation: https://docs.rs/regex/latest/regex/#syntax
//
// Breaking down this Terrible regular expression: tries to match uses of the crate's name in
// compound `use` statement accross multiple lines.
// compound `use` statement across multiple lines.
//
// It's split into 3 parts:
// 1. Matches modules before the usage of the crate's name: `\s*(?:(::)?\w+{sub_modules_match}\s*,\s*)*`
Expand Down
Loading