From d6b4623ff7be4e0f557bc0b846fd499f342dfca8 Mon Sep 17 00:00:00 2001 From: Charles Marsh Date: Wed, 10 Aug 2022 15:14:26 -0400 Subject: [PATCH] Misc. clean up --- Cargo.toml | 2 +- src/bin/main.rs | 3 +++ src/linter.rs | 9 --------- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cc0226adc2..7c38e8ca0f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ clearscreen = "1.0.10" colored = { version = "2.0.0" } fern = { version = "0.6.1" } log = { version = "0.4.17" } -notify = "4.0.17" +notify = { version = "4.0.17" } rayon = { version = "1.5.3" } rustpython-parser = { git = "https://github.com/RustPython/RustPython.git", rev = "dff916d45c5d13074d21ad329a5ab68a6499426a" } serde = { version = "1.0.143", features = ["derive"] } diff --git a/src/bin/main.rs b/src/bin/main.rs index ec6280f988..81b4cee07e 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -85,12 +85,14 @@ fn main() -> Result<()> { set_up_logging(cli.verbose)?; if cli.watch { + // Perform an initial run instantly. clearscreen::clear()?; println!("Starting linter in watch mode..."); println!(); run_once(&cli.files)?; + // Configure the file watcher. let (tx, rx) = channel(); let mut watcher = watcher(tx, Duration::from_secs(1))?; for file in &cli.files { @@ -100,6 +102,7 @@ fn main() -> Result<()> { loop { match rx.recv() { Ok(_) => { + // Re-run on all change events. clearscreen::clear()?; println!("File change detected..."); println!(); diff --git a/src/linter.rs b/src/linter.rs index 097bf0bc79..adfcb28e30 100644 --- a/src/linter.rs +++ b/src/linter.rs @@ -21,15 +21,6 @@ struct CheckResult { } pub fn check_path(path: &Path) -> Result> { - // TODO(charlie): These specific files are causing a stack overflow. - if path.to_string_lossy().eq_ignore_ascii_case( - "../spring-experiments/spr_experiments/spr_experiments/assayworks/experiments/order_20220204/pipeline_steps.py") || - path.to_string_lossy().eq_ignore_ascii_case - ( "../spring-experiments/spr_platform/spr_platform/data_index/bigquery_index.py") - { - return Ok(vec![]); - } - // Check the cache. if let Some(messages) = cache::get(path) { debug!("Cache hit for: {}", path.to_string_lossy());