Ability to reformat and cleanup code on save missing

Hello,

I am using the latest version of Rider (2024.3.5) and noticed that the ability to reformat code and also do cleanup tasks are missing from the “Actions on Save” tools.
Left is what my current installation looks like and the right screenshot shows and older version of Rider with “Reformat and Cleanup Code”.
Any tips on how to enable this in the latest version?

Thanks

0
5 comments

Hello,

Thank you for contacting Rider support. That looks weird. Did you by chance disable any bundled plugins?

I suggest trying to restore the default setting to see if that helps: Shift+Shift → type and select “Restore Default Settings”;

If you do not wish to erase all the settings, you can try enabling all the bundled plugins back:

If nothing helps, I would appreciate it if you could share Rider logs: 

  • Collect it via Help | Collect Logs and Diagnostic Data;
  • Upload the generated archive to the Upload Service and let me know the Upload ID.

Have a nice day!

1

Hey,

thanks for the help. My bundled plugins were all enabled properly.
I deleted my settings, appdata and also tried uninstalling and reinstalling Rider but that did not seem to help.
I then downloaded the Early Access Program in which the “Clean up on save” option was also missing at first, but after doing a code refactoring the feature to clean up on save magically appeared within my settings (it not only appeared inside the early access program but also inside my regular installation).
 

0

Hello, that sounds weird. Might it be you were checking Rider settings without an opening solution? You can open settings right from the welcome dialog:

So, it opens a setting for new projects:

A similar settings dialog can be opened via File | New Projects Setup:

While the settings window you open while having a solution opened is slightly different even visually, look:

I see a similar difference in the screenshots you shared initially.

The cleanup on save can't be configured globally and only can be turned on per project. There is a feature request to allow setting it globally: RIDER-114755 Support saving "Actions on Save | Reformat and Cleanup Code" setting in "Settings for New Projects"

Have a nice day!

0

The documentation states that it's possible to configure for new projects, but like you said Dmitry Kazantsev it's not there.

 

0

Hello Andreas,

Apologies for the confusion made by documentation. This part of article you referenced generally describes the options available to be configured for “Actions on Save” and the way you can access corresponding settings dialog.

As I mentioned, configuring “Reformat and Cleanup on save” is not supported in “Settings for New Projects”. It only can be confured per-project after opening it in Rider. 

You might want upvote this feature request: RIDER-114755.

Meantime, I'll request a team to adjust the documentation making it more accurate. Thank you for your feedback!

0

Please sign in to leave a comment.