disk protector for programmer (replacement of purge).
compile requires go>=1.18 (go.mod requires 1.20)
should be able to run any os that go supported (none os spec api used)
action
read .gitignore for files should be cleaned.
read .cleanignore for files should be kept, this has the higher priority.
read {userhome}/.cleanignore as user level config.
read {ExecuteablePath}/.cleanignore as global config.
note: global and user level config can only process final files or folders,can not match with a relative path.
common use case should to define some common trash or important files those aren't pushed to git.
more detail just go get github.com/ZenLiuCN/cleaner && go install github.com/ZenLiuCN/cleaner && cleaner
sample global .cleanignore
# keeps git and ide config
!.idea/
!.git/
!.vscode/
!*.iml
!*.gradle
!pom.xml
# archive
!*.7z
!*.rar
!*.zip
!*.tar*
# backups
!.bk/
!.backups/
# build tools caches should clean
target/
.bin/
cmake-build-debug*/
node_modules/
# common src skip deep scan to speed up process
!src/