Exclude file from clean up and reformat

Hi,

I need to exclude some specific .json and .cql files from reformatting and clean up when using a profile. Is it possible to do it? I tried using ignore automatically generated code, but its not helping. Also, I do not want to exclude all json files just specific by name.

I am using rider on MacBook version 2021.02.

 

Thank you,

Justina

2 comments
Comment actions Permalink

Hello Justina,

At the current moment it is not possible, but there is an open issue on our tracker: RIDER-48807, please upvote in order to bring increased awareness to the issue and watch for monitoring the progress.

0
Comment actions Permalink

Rider 2021.3.2
Windows 10

Also important because .editorconfig is being updated by Rider when reformatting and code cleanup! Mainly our file_header_template setting gets changed. Spaces after periods are removed in the file_header_template. Thus our file header constantly changes.
Or is there a way to exclude .editorconfig?

Try this in your .editorconfig

[*.cs]
charset = utf-8
end_of_line = crlf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4

file_header_template = \nLine 1. Sentence 2.\n\nLine 3. Sentence 2.\n\n

Notice the "space" before each Sentence 3. After reformatting and cleaning up code - the spaces are removed in the file_header_template.


file_header_template = \nLine 1.Sentence 2.\n\nLine 3.Sentence 2.\n\n


In addition - Visual Studio using the same file_header_template, processes the terminating "\n\n" differently than Rider.

Rider:

// 
// Line 1.Sentence 2.
//
// Line 3.Sentence 2.
//

VS 2022

//
// Line 1.Sentence 2.
//
// Line 3.Sentence 2.
//
//

Notice the extra "//" line?

0

Please sign in to leave a comment.