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
Format on save #34
Comments
I consider this, on the other hand this might also be something which comes with STweep CLI. See : #32 |
This could be a good idea. Since I have a bug on a specific section of my code, I would prefer to have first a flag/decorator that can stop STweep from running on a given set of lines (I haven't found anything on the documentation). So if STweep still has trouble with some lines of code, I could ignore them until the bug is fixed 👍🏻 |
IMHO this is not such a good idea as I have the autosave feature anabled and the project I am working on is currently 1200+ (and growing) objects. I'd rather see STweep either be enabled by the user or by some agent script on commit via webhooks. |
I agree with @HAHermsen. Instead, I'd rather see a format on Build. Builds happen with less frequently than saves, so it wouldn't be overly intrusive. You might need to add some sort of flag to track if a file has already been formatted and has not been changed. Then you wouldn't have to waste time formatting files that don't need it. |
What's the status on this feature? |
Guessing from the previous replies it's under consideration for STweep CLI. Besides that I strongly disagree with this implementing this option in any user interactive GUI. A user should decide when to apply the STweep rather then run it automatically after each SAVE. This makes no sense and hinders any normal workflow significantly. |
@HAHermsen I agree with you that the user should be able to decide if the feature is enabled or not. Certain users might strongly disagree with this feature while others would strongly benefit from a well formatted code base at every commit. Because it can quickly happen that someone forgets to format a file before a commit by accident. |
If you want to enforce a STweep action after a commit, one should use a webhook. Besides that, a commit is not equal to a save action. Therefore I seriously doubt the usefulness of a "STweep on Save". I hope this helps. |
What I would like to avoid is that the local and remote repository commits differ after every push which would happen with the proposed webhook. I would like to use the pipeline rather to verify that the code is properly formatted before every merge and otherwise block it until it is resolved. The format on save in vs code is great, unfortunately I'm usually using the TwinCAT XAE Shell for the PLC programming. So I would love to see a similar feature in the STweep TwinCAT XAE Shell plugin. |
I still have this option on the list, but i dont expect it on short notice, |
Would like to see that too. (I was send here by your friendly support after asking about 'formatt on save') |
Pretty self explanatory but would be an amazing feature.
The text was updated successfully, but these errors were encountered: