mirror of
https://github.com/PR0M3TH3AN/Marlin.git
synced 2025-09-08 07:08:44 +00:00
Merge pull request #32 from PR0M3TH3AN/codex/review-repo-for-maintenance-or-cleanup
Apply repo hygiene fixes
This commit is contained in:
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -35,6 +35,12 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y hyperfine jq bc # For benchmarks within run_all_tests.sh
|
||||
|
||||
- name: Check formatting
|
||||
run: cargo fmt -- --check
|
||||
|
||||
- name: Lint with Clippy
|
||||
run: cargo clippy -- -D warnings
|
||||
|
||||
- name: Ensure run_all_tests.sh is executable
|
||||
run: chmod +x ./run_all_tests.sh
|
||||
|
||||
|
0
bench/dirty-vs-full.sh
Normal file → Executable file
0
bench/dirty-vs-full.sh
Normal file → Executable file
@@ -114,4 +114,4 @@ pub fn run(cmd: &WatchCmd, _conn: &mut Connection, _format: super::Format) -> Re
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -75,4 +75,4 @@ to see test coverage run:
|
||||
|
||||
```bash
|
||||
cargo tarpaulin --out Html
|
||||
```
|
||||
```
|
||||
|
@@ -190,4 +190,4 @@ $ marlin view exec tasks
|
||||
|
||||
---
|
||||
|
||||
*End of DP-001*
|
||||
*End of DP-001*
|
||||
|
@@ -182,4 +182,4 @@ marlin view exec tasks
|
||||
|
||||
Happy organising!
|
||||
|
||||
```
|
||||
```
|
||||
|
@@ -183,4 +183,4 @@ Benchmarks run nightly; regressions block merge.
|
||||
* **Buffer** +10 % (3 weeks) for holidays & unknowns → **33 weeks** (\~8 months).
|
||||
* **Rough budget** (3 FTE avg × 33 wks × \$150 k/yr) ≈ **\$285 k** payroll + \$15 k ops / tooling.
|
||||
|
||||
---
|
||||
---
|
||||
|
@@ -496,4 +496,4 @@ mod tests {
|
||||
assert_eq!(info.id, "backup_badformat.db");
|
||||
assert_eq!(info.timestamp, expected_ts);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -188,4 +188,4 @@ CREATE INDEX IF NOT EXISTS idx_files_path ON files(path);
|
||||
CREATE INDEX IF NOT EXISTS idx_files_hash ON files(hash);
|
||||
CREATE INDEX IF NOT EXISTS idx_tags_name_parent ON tags(name, parent_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_file_tags_tag_id ON file_tags(tag_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_attr_file_key ON attributes(file_id, key);
|
||||
CREATE INDEX IF NOT EXISTS idx_attr_file_key ON attributes(file_id, key);
|
||||
|
@@ -154,4 +154,4 @@ mod tests {
|
||||
// Verify the source exists
|
||||
assert!(db_err_no_msg.source().is_some());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -204,4 +204,4 @@ impl Marlin {
|
||||
|
||||
Ok(owned_w) // Return the owned FileWatcher
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -16,6 +16,7 @@ use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::thread::{self, JoinHandle};
|
||||
use std::time::{Duration, Instant};
|
||||
use tracing::info;
|
||||
|
||||
/// Configuration for the file watcher
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -430,7 +431,7 @@ impl FileWatcher {
|
||||
if let Some(db_mutex) = &*db_guard_option {
|
||||
if let Ok(mut _db_instance_guard) = db_mutex.lock() {
|
||||
for event_item in &evts_to_process {
|
||||
println!(
|
||||
info!(
|
||||
"Processing event (DB available): {:?} for path {:?}",
|
||||
event_item.kind, event_item.path
|
||||
);
|
||||
@@ -440,7 +441,7 @@ impl FileWatcher {
|
||||
}
|
||||
} else {
|
||||
for event_item in &evts_to_process {
|
||||
println!(
|
||||
info!(
|
||||
"Processing event (no DB): {:?} for path {:?}",
|
||||
event_item.kind, event_item.path
|
||||
);
|
||||
@@ -454,7 +455,7 @@ impl FileWatcher {
|
||||
let final_evts = debouncer.flush();
|
||||
events_processed_clone.fetch_add(final_evts.len(), Ordering::SeqCst);
|
||||
for processed_event in final_evts {
|
||||
println!(
|
||||
info!(
|
||||
"Processing final event: {:?} for path {:?}",
|
||||
processed_event.kind, processed_event.path
|
||||
);
|
||||
@@ -710,4 +711,4 @@ mod file_watcher_state_tests {
|
||||
assert!(watcher.stop().is_err());
|
||||
assert!(watcher.status().is_err());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -109,4 +109,4 @@ mod tests {
|
||||
assert!(backups_actual_dir.join(&kept_info.id).exists(), "Kept backup file {} should exist", kept_info.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user