danstis / rmstale Goto Github PK
View Code? Open in Web Editor NEWrmstale is a tool to remove stale files recursively below a given directory. Files and folders older than a defined period are removed.
License: MIT License
rmstale is a tool to remove stale files recursively below a given directory. Files and folders older than a defined period are removed.
License: MIT License
Currently directories are not removed, as the removal of files below updates the modified timestamp.
Add a user, I would like the ability to filter the files by file extension, so that I can delete all files in the specified path with the selected extension.
IE: rmstale -path /tmp/ -extension log
Would remove all *.log files in the /tmp/ folder.
As a project maintainer,
I want the tests to be updated to use testify,
as goconvey seems to be end of life.
As a user,
I want the install instructions extended to detail how to install on Mac,
so I don't have to figure it out myself.
Actions taken should be logged
As a user,
I would like the help details to tell me the defaults for each option,
so I know what will be run if I do not specify a value.
As a user, I want the version command output to be updated, so it is easier to read.
Current:
rmstale v=1.12.0
Desired:
rmstale v1.12.0
As a contributor,
I want to have a CONTRIBUTING.md file in the repo,
so I know the guidelines for contributing.
Build should use dep to download imported packages.
It would be preferable to have the log messages updated to a more readable format.
Today they look like this:
INFO : 2018/03/08 14:40:40.643151 rmstale.go:118: Removing 'C:\Users\dan\AppData\Local\Temp\MSI6aeca.LOG'...
I propose they should look more like this:
INFO : 2018/03/08 14:40:40 : Removing 'C:\Users\dan\AppData\Local\Temp\MSI6aeca.LOG'...
or
2018/03/08 14:40:40 : INFO : Removing 'C:\Users\dan\AppData\Local\Temp\MSI6aeca.LOG'...
As a developer, I want to replace the go-prompt dependency, so I rely on less external code.
When attempting to run the linux version of rmstale the following error message is returned.
:~$ ./rmstale
-bash: ./rmstale: cannot execute binary file: Exec format error
As a developer,
I want the rmstale binary to be added to apt-get,
so I can install it on ubuntu with ease.
Currently the file path returned for removed files contains mixed slashes on Windows.
For example:
Removing "C:\\Temp\\rmstale\\/resources/AddEntry.ico"
Removing "C:\\Temp\\rmstale\\/resources/DeleteEntry.ico"
Removing "C:\\Temp\\rmstale\\/resources/EditEntry.ico"
Removing "C:\\Temp\\rmstale\\/resources/ProgressError.ico"
Removing "C:\\Temp\\rmstale\\/resources/ProgressSkip.ico"
Removing "C:\\Temp\\rmstale\\/resources/ProgressSuccess.ico"
Removing "C:\\Temp\\rmstale\\/resources/ProgressWarn.ico"
Removing "C:\\Temp\\rmstale\\/resources"
As a user, I want the dry-run option to remove the need to confirm the operation, so I don't have to also provide the -y param.
As a user, I want the help message that is displayed when you run the tool without arguments to be tidied up so the short and long arguments are presented on one line, so the output is easier to read.
For example, it currently outputs this:
❯ rmstale
-a int
Age in days to check for file modification.
-age int
Age in days to check for file modification.
-confirm
Don't prompt for confirmation.
-e string
Filter files by extension.
-extension string
Filter files by extension.
-p string
Path to check for stale files. (default "C:\\Users\\dan\\AppData\\Local\\Temp")
-path string
Path to check for stale files. (default "C:\\Users\\dan\\AppData\\Local\\Temp")
-v Display version information.
-version
Display version information.
-y Don't prompt for confirmation.
where it could output this:
❯ rmstale
-a, --age int
Age in days to check for file modification.
-y, --confirm
Don't prompt for confirmation.
-e, --extension string
Filter files by extension.
-p, --path string
Path to check for stale files. (default "C:\\Users\\dan\\AppData\\Local\\Temp")
-v, --version
Display version information.
As a user,
I want the install instructions extended to detail how to install on Linux,
so I don't have to figure it out myself.
The choco release process is broken due to changes in the GitHub actions:
Error: Unable to process command '::set-env name=CHOCOPUBLISH::true' successfully.
Error: The `set-env` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS`
should omit type string from declaration of var AppVersion; it will be inferred from the right-hand side
https://codeclimate.com/github/danstis/rmstale/rmstale.go#issue_5a5953294889650001000020
As a user,
I want to have a what-if or dry-run option,
so I can list the files that would be removed without performing the deletes.
Add a -version flag to return app version
Hello, there!
As part of the university research we are currently doing regarding the security of Github Actions, we noticed that one or many of the workflows that are part of this repository are referencing vulnerable versions of the third-party actions. As part of a disclosure process, we decided to open issues to notify GitHub Community.
Please note that there are could be some false positives in our methodology, thus not all of the open issues could be valid. If that is the case, please let us know, so that we can improve on our approach. You can contact me directly using an email: ikoishy [at] ncsu.edu
Thanks in advance
The vulnerability fix that is missing by actions' versions could be related to:
(1) CVE fix
(2) upgrade of vulnerable dependency
(3) fix to secret leak and others.
Please consider updating the reference to the action.
If you end up updating the reference, please let us know. We need the stats for the paper :-)
/opt/hostedtoolcache/goreleaser-action/1.15.2/x64/goreleaser release --rm-dist
Flag --rm-dist has been deprecated, please use --clean instead
• starting release...
• loading config file file=.goreleaser.yml
• DEPRECATED: --rm-dist was deprecated in favor of --clean, check https://goreleaser.com/deprecations#-rm-dist for more details
Currently the walkfunc could potentially remove the root directory if it is old and empty.
The desired behavior is to leave the root folder alone.
In these cases, in case of failure, defer
never gets called. Example:
There is 1 occurrence of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/danstis/rmstale/issue/CRT-D0011/occurrences/
When running with the extension filter, any empty directories are removed.
I would expect that directories are not removed when run with a filter like this.
When running against a folder under any OS, the root folder can be processed even though it states it will not remove it:
>:~$ ./rmstale --path /var/log/dist-upgrade/ --age 14
WARNING: Will remove files and folders recursively below '/var/log/dist-upgrade/' older than 14 days. Continue?: y
-Not removing folder '/var/log/dist-upgrade/' as it is the root folder...-Removing '/var/log/dist-upgrade/'...
ERROR: remove /var/log/dist-upgrade/: permission denied
As a user,
I want rmstale added to winget,
so I can quickly install and update it.
❯ rmstale -a 300
WARNING: Will remove files and folders recursively below 'C:\Users\dan\AppData\Local\Temp' older than 300 days. Continue? (y/n) n
WARN : 22:17:16 Operation not confirmed, exiting.
❯ rmstale -a 300 -y
WARNING: Will remove files and folders recursively below 'C:\Users\dan\AppData\Local\Temp' older than 300 days. Continue? (y/n) n
WARN : 22:17:21 Operation not confirmed, exiting.
❯ rmstale -a 300 --confirm
WARNING: Will remove files and folders recursively below 'C:\Users\dan\AppData\Local\Temp' older than 300 days. Continue? (y/n)
ERROR: 22:17:27 Failed to read user input: unexpected newline
WARN : 22:17:27 Operation not confirmed, exiting.
Required for #74
When running with the version switch, the version returned is not in the correct format:
> rmstale -version
rmstale v=1.7.0
The expected output should be:
rmstale v1.7.0
As a user,
I would like to have the ability to provide parameters as the first letter only, as well as the full word,
so I don't have to continually type the full parameter name.
Example:
rmstale -age 14
should also accept
rmstale -a 14
rmstale/.github/workflows/build.yml
Line 6 in 6665c30
Based on the latest merge of google/logger : google/logger#18 (comment) we should be able to revert to using the original.
Include:
As a developer, I want a new pipeline created that will update the winget package on each release, so the package is always up to date.
Related to #74
Some examples for the pipeline:
When user does not have rights to remove all files the app should continue bypassing any permission issues.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.