diff options
author | Zheyu Zhang <zheyuzhang03@gmail.com> | 2021-10-31 01:20:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-30 19:20:56 +0200 |
commit | 3fb23ab772e87b9314cd8608eb589c72a53efaee (patch) | |
tree | 702262c57f3ac3c32046e6443983f58d6c962686 /cli/tools/lint.rs | |
parent | 94a81e5e9bda5a7da51bc864e544bf35ef26910e (diff) |
fix(cli): linter/formater watches current directory without args (#12550)
Diffstat (limited to 'cli/tools/lint.rs')
-rw-r--r-- | cli/tools/lint.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/tools/lint.rs b/cli/tools/lint.rs index 1f85e8b02..706ecbbd8 100644 --- a/cli/tools/lint.rs +++ b/cli/tools/lint.rs @@ -86,6 +86,10 @@ pub async fn lint( } } + if include_files.is_empty() { + include_files = [std::env::current_dir()?].to_vec(); + } + let reporter_kind = if json { LintReporterKind::Json } else { |