mirror of
https://github.com/astral-sh/ruff
synced 2026-01-22 14:00:51 -05:00
Misc. clean up
This commit is contained in:
@@ -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!();
|
||||
|
||||
@@ -21,15 +21,6 @@ struct CheckResult {
|
||||
}
|
||||
|
||||
pub fn check_path(path: &Path) -> Result<Vec<Message>> {
|
||||
// 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());
|
||||
|
||||
Reference in New Issue
Block a user