Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add option for conditional per-file Automatic Cleanup on Save based on comment at top of file #1043

Open
RichardSinden opened this issue Feb 23, 2024 · 0 comments

Comments

@RichardSinden
Copy link

Environment

  • Visual Studio 2022
  • CodeMaid version: 12.0.300
  • Code language: Anything CodeMaid supports

Description

I'm working on a large legacy codebase and I don't want to automatically cleanup every file that I save, because reorganising everything creates a bit of pain detecting actual changes in the changelogs. However, when I add a new file, I would like the option to tag that file to always be cleaned up on save.

Therefore, I propose adding an option to make the automatic cleanup conditional, based on a configurable comment at the top of the file.
When cleanup is run manually on a file then CodeMaid should write the comment to the file. e.g. defaulting to something like
// Auto-organized by CodeMaid
(obviously the comment syntax would need to be appropriate to the language)

When a file is saved then CodeMaid should check for the presence of the comment and, if it exists, then cleanup can be performed. If it doesn't then the file should be ignored by CodeMaid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant