Disabling custom rules in "generated code" regions

Dec 6, 2012 at 6:25 PM

According to this link, StyleCop doesn't analyze code under a region which has "generated code" as part of its name. While I was able to observe that this is true for the built-in StyleCop rules, my custom rules are still being fired.

That said, are developers supposed to check whether the analyzed code is under a "generated code" region? I though the StyleCop framework itself would be doing that for me, by design.

Thanks,
-- AFurtado

Coordinator
Dec 6, 2012 at 6:47 PM
Any customer rule has to decide whether to run by checking whether the code part passed to it is in a generated block or not.


~A.

On 6 Dec 2012, at 18:26, AFurtado <notifications@codeplex.com> wrote:

From: AFurtado

According to this link, StyleCop doesn't analyze code under a region which has "generated code" as part of its name. While I was able to observe that this is true for the built-in StyleCop rules, my custom rules are still being fired.

That said, are developers supposed to check whether the analyzed code is under a "generated code" region? I though the StyleCop framework itself would be doing that for me, by design.

Thanks,
-- AFurtado