AssemblyInfo.cs is a Generated File correct?

May 23, 2011 at 4:16 PM

I just noticed this behavior but I suspect its been happening for a while.  I'm getting SA1024 due the to spacing around the colon, which is definitely legitimate except for the fact that I have "Analyze generated files" turned off in the settings.  Is AssemblyInfo.cs not considered a generated file?

 

-Thanks!

Developer
May 23, 2011 at 5:49 PM

Hi,

AssemblyInfo.cs is not currently considered as generated file, so the setting you mentioned doesn't control it anyhow.

Moreover, in a month or two we are going to slightly redesign the way StyleCop deal with "designer" and "generated" files.
One possible scenario is that after simplifying both "Analyze generated files" and "Analyse designer files" settings will dissapear and there will be the only setting (with UI support) which will specify several filters (regular expressions) for files you want to skip.

Best regards,
Oleg Shuruev

May 23, 2011 at 5:55 PM

That would be a fantastic improvement.  Thanks!

Jan 6, 2012 at 9:24 AM

So, how is it going? I still get tons of violations on AssemblyInfo.cs.

Jan 11, 2012 at 12:32 AM

What kind of violations are you seeing?  All my AssemblyInfo.cs files pass without any violations on pretty much a default ruleset.

Mar 19, 2012 at 8:19 AM
warrenr wrote:

What kind of violations are you seeing?  All my AssemblyInfo.cs files pass without any violations on pretty much a default ruleset.

Yes. You are correct. The latest versions do not have that problem.