switch to ignore::walk for fmt/check
This commit is contained in:
1 parent
245ca9bce2
commit
ec80e6bd37
2 files changed
+1
-7
No files matched your search
@@ -8,7 +8,6 @@ use crate::BuildRequest;
|
||||
use anyhow::Context;
|
||||
use futures_util::{stream::FuturesUnordered, StreamExt};
|
||||
use std::path::Path;
|
||||
use walkdir::WalkDir;
|
||||
|
||||
/// Check the Rust files in the project for issues.
|
||||
#[derive(Clone, Debug, Parser)]
|
||||
@@ -125,8 +124,7 @@ async fn check_files_and_report(files_to_check: Vec<PathBuf>) -> Result<()> {
|
||||
}
|
||||
|
||||
pub(crate) fn collect_rs_files(folder: &Path, files: &mut Vec<PathBuf>) {
|
||||
let dir = WalkDir::new(folder).follow_links(true).into_iter();
|
||||
for entry in dir.flatten() {
|
||||
for entry in ignore::Walk::new(folder).flatten() {
|
||||
if entry.path().extension() == Some("rs".as_ref()) {
|
||||
files.push(entry.path().to_path_buf());
|
||||
}
|
||||
|
||||
@@ -348,10 +348,6 @@ impl Workspace {
|
||||
let mut ignore_builder = ignore::gitignore::GitignoreBuilder::new(workspace_dir);
|
||||
ignore_builder.add(workspace_dir.join(".gitignore"));
|
||||
|
||||
// todo!()
|
||||
// let workspace_dir = self.workspace_dir();
|
||||
// ignore_builder.add(workspace_dir.join(".gitignore"));
|
||||
|
||||
for path in Self::default_ignore_list() {
|
||||
ignore_builder
|
||||
.add_line(None, path)
|
||||
|
||||
Reference in new issue
Block a user