Resharper function to fix naming convention issues

前端 未结 2 1518
庸人自扰
庸人自扰 2021-02-14 14:29

A bunch of classes doesn\'t comply to our naming conventions for private variables. Resharper shows this as a warning, but wants me to fix all of them by hand. Is there some mag

2条回答
  •  南旧
    南旧 (楼主)
    2021-02-14 14:47

    In more recent versions of ReSharper, this is much easier, but the solution might not be obvious. It wasn't for me!

    Here are the steps:

    • When an inconsistent naming is detected, ReSharper underlines the symbol in question. Click on it. This will cause a light bulb to appear in the margin.
    • Click on the light bulb. The first option should be 'rename to [corrected name]'. To the right, there's an arrow.
    • Click the arrow to drill down. From there, you can choose Fix in File, Fix in Project, and so on.

提交回复
热议问题