Style Cop
-
I started to check out StyleCop this morning. I'm not going to rant about every other rule it follows, but has anyone noticed that the file **.Designer.cs violates:
SA1201: All methods must be placed after all fields.
Windows creates this file. I think I'm done with StyleCop.
-
I started to check out StyleCop this morning. I'm not going to rant about every other rule it follows, but has anyone noticed that the file **.Designer.cs violates:
SA1201: All methods must be placed after all fields.
Windows creates this file. I think I'm done with StyleCop.
I never understood the need to for formatting software (I think that is what StyleCop is right?).
-
I started to check out StyleCop this morning. I'm not going to rant about every other rule it follows, but has anyone noticed that the file **.Designer.cs violates:
SA1201: All methods must be placed after all fields.
Windows creates this file. I think I'm done with StyleCop.
StyleCop is meant to be used on user-written source files. Do not use it on auto-generated files :-)
Regards, Nish
My technology blog: voidnish.wordpress.com
-
I started to check out StyleCop this morning. I'm not going to rant about every other rule it follows, but has anyone noticed that the file **.Designer.cs violates:
SA1201: All methods must be placed after all fields.
Windows creates this file. I think I'm done with StyleCop.
Is that the latest incarnation of FXCOP? Perfect tool if you want lots of criticism of perfectly valid code if so.
Regards, Rob Philpott.
-
I never understood the need to for formatting software (I think that is what StyleCop is right?).
Not so much formatting as code styles and guidelines, like variable naming, comments, order of fields, methods etc.
Regards, Nish
My technology blog: voidnish.wordpress.com
-
I never understood the need to for formatting software (I think that is what StyleCop is right?).
-
Is that the latest incarnation of FXCOP? Perfect tool if you want lots of criticism of perfectly valid code if so.
Regards, Rob Philpott.
No, FxCop and StyleCop are different. StyleCop analyzes your source code, whereas FxCop does static analysis on your compiled assembly. Normally you are supposed to use them together, so they complement each other.
Regards, Nish
My technology blog: voidnish.wordpress.com
-
It was recommended to me in a previous post regarding a coworker's use of under_score instead of underScore in the middle of variables. Someone recommended that I try StyleCop to settle our convention disputes.
You really don't need a tool to police that. The accepted convention is camel case for variables, so under_score is simply wrong. Suggest (s)he reads a book or something.
Regards, Rob Philpott.
-
No, FxCop and StyleCop are different. StyleCop analyzes your source code, whereas FxCop does static analysis on your compiled assembly. Normally you are supposed to use them together, so they complement each other.
Regards, Nish
My technology blog: voidnish.wordpress.com
Oh, ok. In which case, I hate *both* of them.
Regards, Rob Philpott.
-
Oh, ok. In which case, I hate *both* of them.
Regards, Rob Philpott.
-
It was recommended to me in a previous post regarding a coworker's use of under_score instead of underScore in the middle of variables. Someone recommended that I try StyleCop to settle our convention disputes.
How about the MS Naming Guidelines[^]??
Sarchasm : The gulf between the author of sarcastic wit and the person who doesn't get it.
-
I never understood the need to for formatting software (I think that is what StyleCop is right?).
I sometimes feel alone in this opinion, but I believe that source code readability is a very, very, close second place to code correctness. Anyone else?
"Why look within yourself for THE TRUTH, when you're the one who's confused in the first place?" Mr. Spackle
-
I started to check out StyleCop this morning. I'm not going to rant about every other rule it follows, but has anyone noticed that the file **.Designer.cs violates:
SA1201: All methods must be placed after all fields.
Windows creates this file. I think I'm done with StyleCop.
-
You really don't need a tool to police that. The accepted convention is camel case for variables, so under_score is simply wrong. Suggest (s)he reads a book or something.
Regards, Rob Philpott.
Rob Philpott wrote:
The accepted convention is camel case for variables, so under_score is simply wrong.
That is your opinion. Microsoft begs to differ with their internal coding practices. I thought we killed this bird a few days ago.
-
I sometimes feel alone in this opinion, but I believe that source code readability is a very, very, close second place to code correctness. Anyone else?
"Why look within yourself for THE TRUTH, when you're the one who's confused in the first place?" Mr. Spackle
me too. which is why i think LINQ is crap.
-
Rob Philpott wrote:
The accepted convention is camel case for variables, so under_score is simply wrong.
That is your opinion. Microsoft begs to differ with their internal coding practices. I thought we killed this bird a few days ago.
Mine and everyone else I know - yes.
Regards, Rob Philpott.
-
Not so much formatting as code styles and guidelines, like variable naming, comments, order of fields, methods etc.
Regards, Nish
My technology blog: voidnish.wordpress.com
Thanks for the correction. :)
-
Mine and everyone else I know - yes.
Regards, Rob Philpott.
Since you like it, what's the rationale for starting just the first word with a lower case letter? Why is
customerAccountNumber
better thanCustomerAccountNumber
orstrCustomerAccountNumber
orlpszCustomerAccountNumber
? -
Thanks for the correction. :)