From e4b4600752d3c7102f01d074c25b4798b75c2bed Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 8 Jul 2020 22:47:50 +0200 Subject: better language --- crates/vfs-notify/src/include.rs | 4 ++-- xtask/tests/tidy.rs | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/crates/vfs-notify/src/include.rs b/crates/vfs-notify/src/include.rs index 7378766f5..72f928536 100644 --- a/crates/vfs-notify/src/include.rs +++ b/crates/vfs-notify/src/include.rs @@ -9,8 +9,8 @@ use paths::{RelPath, RelPathBuf}; /// /// It describes the set of files inside some directory. /// -/// The current implementation is very limited, it allows white-listing file -/// globs and black-listing directories. +/// The current implementation is very limited, it allows including file globs +/// and recursively excluding directories. #[derive(Debug, Clone)] pub(crate) struct Include { include_files: GlobSet, diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index f99935170..fcfad609d 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -50,18 +50,19 @@ fn rust_files_are_tidy() { } fn check_todo(path: &Path, text: &str) { - let whitelist = &[ - // This file itself is whitelisted since this test itself contains matches. + let need_todo = &[ + // This file itself obviously needs to use todo (<- like this!). "tests/cli.rs", - // Some of our assists generate `todo!()` so those files are whitelisted. + // Some of our assists generate `todo!()`. "tests/generated.rs", "handlers/add_missing_impl_members.rs", "handlers/add_turbo_fish.rs", "handlers/generate_function.rs", - // To support generating `todo!()` in assists, we have `expr_todo()` in ast::make. + // To support generating `todo!()` in assists, we have `expr_todo()` in + // `ast::make`. "ast/make.rs", ]; - if whitelist.iter().any(|p| path.ends_with(p)) { + if need_todo.iter().any(|p| path.ends_with(p)) { return; } if text.contains("TODO") || text.contains("TOOD") || text.contains("todo!") { @@ -139,7 +140,7 @@ impl TidyDocs { ) } - let whitelist = [ + let poorly_documented = [ "ra_hir", "ra_hir_expand", "ra_ide", @@ -153,9 +154,9 @@ impl TidyDocs { ]; let mut has_fixmes = - whitelist.iter().map(|it| (*it, false)).collect::>(); + poorly_documented.iter().map(|it| (*it, false)).collect::>(); 'outer: for path in self.contains_fixme { - for krate in whitelist.iter() { + for krate in poorly_documented.iter() { if path.components().any(|it| it.as_os_str() == *krate) { has_fixmes.insert(krate, true); continue 'outer; @@ -166,7 +167,7 @@ impl TidyDocs { for (krate, has_fixme) in has_fixmes.iter() { if !has_fixme { - panic!("crate {} is fully documented, remove it from the white list", krate) + panic!("crate {} is fully documented :tada:, remove it from the list of poorly documented crates", krate) } } } -- cgit v1.2.3