Spaces before brackets (one more attempt for advice).

Chaps, I've asked this before but I'd really like an working solution. Please advise or tell me to sod off!:^O

I have the space option correctly set to disable inserting a space before a bracket. No matter the setting, I always get a space before a bracket. If I type in new code or I copy-and-paste an existing "if" block, a space is always inserted between the "if" and the bracket. If I've set the option correctly, why is RS refusing to honour it? I really would like to nail this problem once and for all. I'm not doing anything fancy just trying to get the configuration to work for me the way I want. I have the same problem with "while" statements as well. It's almost as if my RS settings are being ignored.

I really would appreciate a practical solution if there is one.

3 comments
Comment actions Permalink

Hi Peter,

This option works fine for me out of box with ReSharper 8.0.1 (see screenshot).

1. What R# version do you use?
2. Do you have StyleCop installed?

Thanks!



Attachment(s):
screen546.png
0
Comment actions Permalink

Alex,

1. I have just downloaded version 8.0.1 and installed it.

2. I don't have StyleCop.

I rechecked my space options and like your screenshot, I too have disabled spaces before parentheses, but for some reason, they are still generated. If I knew what configuration files to send you I'd happily zip them up and send them for review and inspection.

I don't have any other add-ins or anything that might get in the way of my settings.

0
Comment actions Permalink

Hi Peter,

Ok, then could you please reset all settings via ReSharper | Manage options | Reset all settings dialog, and re-check this option? Possibly, the formatting settings are somehow corrupted, and doing it all from the scratch can help in this case.

Thanks!

0

Please sign in to leave a comment.