1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 18:34:46 +00:00
Commit Graph

37 Commits

Author SHA1 Message Date
TomP0
61723e8d86 fix: handle empty arrays in clean_dev_jetbrains_toolbox (#361)
Add checks for empty product_dirs and version_dirs arrays before
iterating to prevent "unbound variable" errors when running with
set -u (pipefail) and the JetBrains Toolbox directory doesn't exist
or contains no products.
2026-01-26 10:49:30 +08:00
Tw93
500b6dc554 fix(clean): silence ShellCheck SC2053 2026-01-23 18:32:33 +08:00
Tw93
8c9cd1f90c feat(clean): add JetBrains Toolbox old IDE cleanup with whitelist-safe handling 2026-01-23 17:37:37 +08:00
Tw93
3f85c8238f Use gray color for warning icons to reduce visual noise 2026-01-20 15:07:37 +08:00
Tw93
acdf40dd2c Unify output format for multiple versions check 2026-01-20 14:44:11 +08:00
Tw93
2d5ccf5d71 fix: exclude Flutter/CocoaPods/Pub caches from cleanup (#334)
Prevent forced re-downloads and re-installations by not cleaning:
- ~/Library/Caches/CocoaPods (spec repo cache)
- ~/.cache/flutter (engine/artifacts cache)
- ~/.pub-cache (Dart package cache)

Also standardize redirection syntax to '> /dev/null' for consistency.

Fixes #334
2026-01-19 17:08:35 +08:00
Tw93
421cdd09dc feat: enhance safe cache cleaning for Electron apps and VS Code
- Add safe cleanup for Antigravity, Filo, and Claude caches in Application Support (Cache, GPUCache, Code Cache only).
- Enhance VS Code cleanup to include deep rendering caches (GPU, Dawn) and extension installers.
- Validated to ensure no user data or pnpm/yarn executables are touched.
2026-01-13 19:04:54 +08:00
Tw93
0bd30955a2 feat: detect multiple NDK and Rust toolchain versions (#234)
Add report-only detection for multiple Android NDK and Rust toolchain
installations. Users receive helpful guidance for manual cleanup via
Android Studio SDK Manager or rustup commands.

- Add check_android_ndk() and check_rust_toolchains()
- Extract check_multiple_versions() helper (DRY)
- Add 4 test cases, optimize test performance
- Fix shellcheck warnings

All 393 tests passing.
2026-01-13 15:59:43 +08:00
Tw93
1a40875b80 refactor: improve code quality and test coverage
This commit addresses several code quality issues identified in the
recent bash 3.2 compatibility fixes:

1. Remove redundant array length check in is_whitelisted()
   - The second check for array length > 0 is unnecessary after
     already checking for length == 0

2. Clean up commented dangerous cleanup code in dev.sh
   - Replace commented-out code with clear documentation
   - Add explicit notes explaining why certain paths are excluded
   - Improves maintainability by preventing confusion

3. Enhance test coverage for excluded paths
   - Add tests to verify Mix archives are NOT cleaned
   - Add tests to verify Stack programs are NOT cleaned
   - Add tests to verify VS Code workspace storage is NOT cleaned
   - These tests ensure critical data remains protected

All changes pass ShellCheck, syntax validation, and formatting checks.
2026-01-12 10:09:02 +08:00
Tw93
54be4e30a2 fix: global optimization for safe_clean and doc update 2026-01-11 09:55:18 +08:00
Tw93
413b2c8f98 fix: disable aggressive cleanup and optimize directory checks 2026-01-11 09:27:12 +08:00
biplavbarua
096c0ca73f feat: add cleanup support for Elixir, Haskell, OCaml, and Editors 2026-01-10 01:22:43 +05:30
Tw93
f5a8adb97e feat: implement empty Library directory cleanup and Android NDK version check. 2026-01-03 09:41:05 +08:00
Tw93
d701519310 refactor: simplify pnpm environment variable handling in clean script 2026-01-02 19:10:20 +08:00
Tw93
910e79df4e feat: Improve clean command's regex handling and pnpm cache cleaning, enhance test output, update completion descriptions, and clarify installation instructions. 2026-01-02 18:50:42 +08:00
Tw93
9aa569cbb6 feat: Enhance clean, optimize, analyze, and status commands, and update security audit documentation. 2025-12-31 16:23:31 +08:00
Tw93
6c1fcd23d7 feat: optimize clean operation performance by pre-expanding whitelist patterns, improving size calculation, and adapting parallel processing based on file types, alongside test suite enhancements. 2025-12-30 17:13:43 +08:00
Tw93
694c55f73b fix: implement layered error tolerance and accurate cleanup reporting (#175 #176 #180)
- Fix safe_remove set -e trap in command substitution
  - Fix has_full_disk_access false positives and unknown state handling
  - Use set +e in perform_cleanup for graceful degradation
  - Track removal failures and only count actually deleted items (#180)
  - Add "Skipped X items (permission denied or in use)" notification
  - Improve spinner reliability with cooperative stop mechanism (#175)
2025-12-29 14:27:47 +08:00
Tw93
faac42cb62 Improve performance and process handling 2025-12-28 19:37:42 +08:00
Tw93
d17c9efe47 Add progress spinners to developer tool cleanup task 2025-12-27 10:17:05 +08:00
Tw93
27f57bd361 Merge branch 'main' of github.com:tw93/Mole 2025-12-26 12:55:12 +08:00
Kwaku Biney
f9309bae01 improv: prompt user when Docker daemon not running (#155)
Signed-off-by: kwakubiney <kebiney@hotmail.com>
2025-12-26 12:54:39 +08:00
Tw93
428fc86f66 refactor: streamline pnpm cache cleaning by adjusting description and removing redundant store paths. 2025-12-26 12:49:56 +08:00
Tw93
2c5253736b chore: auto format code 2025-12-26 03:46:26 +00:00
Ruben Nogueira
4163fab312 feat: pnpm clean (#156)
* feat: pnpm clean

* fix: pnpm use prune
2025-12-26 11:46:00 +08:00
Tw93
240202dfa9 refactor: Extract Apple Silicon cache cleaning to a shared function and improve optimization summary calculation. 2025-12-19 20:35:54 +08:00
Tw93
af03452f6d feat: Enhance clean and optimize operations with new configuration constants 2025-12-18 17:02:04 +08:00
Tw93
70ce2a41c5 chore: Remove Rust documentation cache cleaning 2025-12-13 15:01:30 +08:00
Tw93
012c0b257c chore: auto format code 2025-12-13 05:38:36 +00:00
Tw93
da73cb901e feat: Add local APFS snapshot cleanup, optimize Homebrew health check, and enhance UI feedback for various operations 2025-12-13 13:37:41 +08:00
Tw93
67a8e83511 chore: Exclude JetBrains caches from cleaning 2025-12-12 16:04:38 +08:00
Tw93
78e6743666 Performance and speed optimization 2025-12-08 15:34:51 +08:00
Tw93
8fa3a2c9c5 Clean up and calculate more correctly. 2025-12-06 20:28:49 +08:00
Tw93
d4600f6623 More perfect cleaning 2025-12-06 12:53:16 +08:00
Tw93
c2abb639dc Continue to fix the exit issue 2025-12-06 09:17:58 +08:00
Tw93
f30332ed7d clean Xcode unavailable simulators 2025-12-05 23:58:55 +08:00
Tw93
4bd4ffc7be Reconstruct clean lib code 2025-12-01 16:58:35 +08:00