ReSharper - how to disable generation of rubbish documentation headers in Code Cleanup

后端 未结 2 1021
面向向阳花
面向向阳花 2021-01-12 07:40

We\'re using ReSharper 6.0 with StyleCop for ReSharper.

Although we use the StyleCop rule that members must have documentation headers, we don\'t want ReSharper\'s c

相关标签:
2条回答
  • 2021-01-12 07:52

    The second step, after blocking code generation is Removing the rubbish. I used a regex Search/Replace through visual studio.

    Regex is for header :

    // ---.*\r\n\/\/.*\r\n\/\/.*\r\n\/\/.*\r\n\/\/.*\r\n\/\/.*\r\n.*\r\n\/\/.-{116}
    

    Regex to remove Generated summaries

    \s{4}\/\/\/\s<summary>(.*)\r\n.*\r\n.*</summary>
    

    Caution : it will remove ALL summaries, even the good ones, so check the replacement scope before launching it. (git checkout might be your friend...)

    0 讨论(0)
  • 2021-01-12 08:18

    ReSharper -> Options -> Tools section -> Code Cleanup -> select StyleCop profile -> Documentation section -> untick 1600.

    Will prevent default documentation headers being created but StyleCop will still enforce that they should be there.

    0 讨论(0)
提交回复
热议问题