JetBrains Rider
 
Get JetBrains Rider
You are viewing the documentation for an earlier version of JetBrains Rider.

File header style

Last modified: 24 May 2022

Using file headers for copyright notices and other identifying messages is a common practice. JetBrains Rider allows you to configure the default header text and automatically insert it into code files of your solution.

You can configure file header either in JetBrains Rider settings or in .editorconfig files and then add it to new files created with file templates and insert it to existing files using code cleanup.

You can update file header in code that you have recently modified and are going to commit to Git. JetBrains Rider will run the selected cleanup profile before committing.

You can update file header every time you save changes in a file to make sure that your edits always comply with your code style. Note that this will only happen when you save changes explicitly with Ctrl+S or Ctrl+Shift+S and will not be triggered by auto-saving. However, all auto-saved files are placed to the 'reformat and cleanup' queue and will be processed on the next explicit save.