summaryrefslogtreecommitdiff
path: root/cli/tools/lint.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tools/lint.rs')
-rw-r--r--cli/tools/lint.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/tools/lint.rs b/cli/tools/lint.rs
index 9bfe1fd16..4a622f0a0 100644
--- a/cli/tools/lint.rs
+++ b/cli/tools/lint.rs
@@ -51,18 +51,17 @@ fn create_reporter(kind: LintReporterKind) -> Box<dyn LintReporter + Send> {
}
pub async fn lint(flags: Flags, lint_flags: LintFlags) -> Result<(), AnyError> {
- if flags.watch.is_some() {
+ if let Some(watch_flags) = &lint_flags.watch {
if lint_flags.is_stdin() {
return Err(generic_error(
"Lint watch on standard input is not supported.",
));
}
- let clear_screen = !flags.no_clear_screen;
file_watcher::watch_func(
flags,
file_watcher::PrintConfig {
job_name: "Lint".to_string(),
- clear_screen,
+ clear_screen: !watch_flags.no_clear_screen,
},
move |flags, sender, changed_paths| {
let lint_flags = lint_flags.clone();