mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-22 21:41:37 +00:00
Add formatting and static analysis scripts with usage instructions
- Introduced new scripts for auto-fixing formatting and performing static analysis across the project, including support for Lua, Rust, and TypeScript. - Created `format.md` documentation to guide users on running the formatting scripts. - Updated CI scripts to utilize the number of processor threads for improved performance during linting and testing. - Enhanced logging in the `unwatch` function to provide clearer feedback on path watching status. These changes streamline the formatting and analysis process, ensuring consistent code quality across the project.
This commit is contained in:
parent
5c4fd801db
commit
dea60eb4cf
6 changed files with 309 additions and 26 deletions
|
|
@ -352,22 +352,27 @@ impl VfsBackend for StdBackend {
|
|||
}
|
||||
|
||||
fn unwatch(&mut self, path: &Path) -> io::Result<()> {
|
||||
// Only remove from watches if unwatch succeeds
|
||||
// This keeps state consistent if unwatch fails (e.g., path wasn't directly watched)
|
||||
let was_watched = self.watches.contains(path);
|
||||
|
||||
match self.debouncer.unwatch(path) {
|
||||
Ok(()) => {
|
||||
log::info!("Unwatched path: {}", path.display());
|
||||
if was_watched {
|
||||
log::info!("Unwatched path: {}", path.display());
|
||||
} else {
|
||||
log::trace!(
|
||||
"Unwatched path (was not actively watched): {}",
|
||||
path.display()
|
||||
);
|
||||
}
|
||||
self.watches.remove(path);
|
||||
Ok(())
|
||||
}
|
||||
Err(err) => {
|
||||
// If the path wasn't being watched (common when parent dir is watched),
|
||||
// still remove from our tracking set but don't propagate the error
|
||||
if matches!(
|
||||
err.kind,
|
||||
notify::ErrorKind::WatchNotFound | notify::ErrorKind::PathNotFound
|
||||
) {
|
||||
log::info!(
|
||||
log::trace!(
|
||||
"Path was not directly watched (likely covered by parent): {}",
|
||||
path.display()
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue