summaryrefslogtreecommitdiff
path: root/cli/flags.rs
diff options
context:
space:
mode:
authorCGQAQ <m.jason.liu@outlook.com>2021-10-06 05:07:38 +0800
committerGitHub <noreply@github.com>2021-10-05 23:07:38 +0200
commitc555b31d40bcc374013395bd5805410fe7f77b20 (patch)
tree659a4182122a923bde884b72e6a02242c68293d9 /cli/flags.rs
parent22328f87585611ae70e555ad7941cc5093b92544 (diff)
feat(lint): add support for --watch flag (#11983)
Diffstat (limited to 'cli/flags.rs')
-rw-r--r--cli/flags.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/flags.rs b/cli/flags.rs
index dc0e932ef..3075eda40 100644
--- a/cli/flags.rs
+++ b/cli/flags.rs
@@ -1140,6 +1140,7 @@ Ignore linting a file by adding an ignore comment at the top of the file:
.multiple(true)
.required(false),
)
+ .arg(watch_arg())
}
fn repl_subcommand<'a, 'b>() -> App<'a, 'b> {
@@ -1964,6 +1965,7 @@ fn lsp_parse(flags: &mut Flags, _matches: &clap::ArgMatches) {
fn lint_parse(flags: &mut Flags, matches: &clap::ArgMatches) {
config_arg_parse(flags, matches);
+ flags.watch = matches.is_present("watch");
let files = match matches.values_of("files") {
Some(f) => f.map(PathBuf::from).collect(),
None => vec![],