I sometimes despair of MS [modified Someone, sort of, agrees with me]
-
Henry Minute wrote:
With Windows 7, it's one rule for Redmond, another one for everyone else."
One O.S. to rule them all, one search to find them, one desktop to bring them all, and in the darkness bind them.
Software Zen:
delete this;
Fold With Us![^]Gary R. Wheeler wrote:
One O.S. to rule them all, one search to find them, one desktop to bring them all, and in the darkness bind them.
Weven does sound like it ought to be a river/village in Middle Earth. Doesn't it?
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
You could be right. I may well be confusing the two. That does not, however, negate my point. If MS publishes rules for things like naming conventions and the like, it should stick to them.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
Henry Minute wrote:
If MS publishes rules for things like naming conventions and the like, it should stick to them.
MS Does follow FxCop rules well. You will find that all the new MS development after FxCop was developed follow these rules. StyleCop is a new thing and it does not have any strong backing. Also StyleCop is not meant to be followed for generated code anyway, I believe the default options are turned off for that.
-
Marc Clifton wrote:
You could, probably, generate your own FXCop-compliant code from the EDM's XML
That's probably true. It would certainly be quicker than attempting to do it in the Editor. I haven't got round to looking at the XML yet. However, that would get me off on another rant about the .NET code generation classes and their inability to, amongst other things, deal with line-breaks properly. :laugh: [MOD] BTW, I started my exploration of EF with your Intro to EF article. [/MOD]
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
Henry Minute wrote:
BTW, I started my exploration of EF with your Intro to EF article.
:cool: Marc
-
Henry Minute wrote:
If MS publishes rules for things like naming conventions and the like, it should stick to them.
MS Does follow FxCop rules well. You will find that all the new MS development after FxCop was developed follow these rules. StyleCop is a new thing and it does not have any strong backing. Also StyleCop is not meant to be followed for generated code anyway, I believe the default options are turned off for that.
I have done a little research since your last post and have discovered that I was not confusing FXCop and StyleCop. I said FXCop and I meant FXCop. So that you are aware of the research that I did, I will tell you what it was. I took my brand new copy of 'Framework Design Guidelines Conventions, Idioms, and Patterns for Reusable .NET Libraries' out of the wrapper it arrived in, and read it. Page 372. B.2 The Evolution of FXCop Para 1. Line 6 onwards. "In addition to enforcing the Framework Design Guidelines" (my emboldening) Page 368. 3rd rule "DO use camelCasing for local variables" (their emboldening) So there immediately is one rule that the generated code breaks. The point that StyleCop does not check generated code is true (<autogenerated> tag in header). To some extent that makes sense, but only because it would be difficult to enforce for third party tools. For In-House tools, generate the code, edit out the 'autogenerated' tab and whack the thing through FXCop and/or StyleCop. Repeat until done. Then, and only then release the tool. To say that it doesn't count because it's generated code is anarchy. Any development group inside MS could then stuff anything they felt like in a generated file. Brad Abrahams in his 'Coding Style Guidelines' document said "The reasons to extend the public rules (no Hungarian, no prefix for member variables, etc.) is to produce a consistent source code appearance. In addition a goal is to have clean readable source. Code legibility should be a primary goal." That is as valid for MS 'generated' code as for any other code they produce. End of! No ifs, ands or buts. If they are going to have rules they should stick to them, for all in-house code. If they are incapable of doing that, that tells us a lot about what to expect from any of their products in the future. :mad: :rolleyes: :zzz:
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
I have done a little research since your last post and have discovered that I was not confusing FXCop and StyleCop. I said FXCop and I meant FXCop. So that you are aware of the research that I did, I will tell you what it was. I took my brand new copy of 'Framework Design Guidelines Conventions, Idioms, and Patterns for Reusable .NET Libraries' out of the wrapper it arrived in, and read it. Page 372. B.2 The Evolution of FXCop Para 1. Line 6 onwards. "In addition to enforcing the Framework Design Guidelines" (my emboldening) Page 368. 3rd rule "DO use camelCasing for local variables" (their emboldening) So there immediately is one rule that the generated code breaks. The point that StyleCop does not check generated code is true (<autogenerated> tag in header). To some extent that makes sense, but only because it would be difficult to enforce for third party tools. For In-House tools, generate the code, edit out the 'autogenerated' tab and whack the thing through FXCop and/or StyleCop. Repeat until done. Then, and only then release the tool. To say that it doesn't count because it's generated code is anarchy. Any development group inside MS could then stuff anything they felt like in a generated file. Brad Abrahams in his 'Coding Style Guidelines' document said "The reasons to extend the public rules (no Hungarian, no prefix for member variables, etc.) is to produce a consistent source code appearance. In addition a goal is to have clean readable source. Code legibility should be a primary goal." That is as valid for MS 'generated' code as for any other code they produce. End of! No ifs, ands or buts. If they are going to have rules they should stick to them, for all in-house code. If they are incapable of doing that, that tells us a lot about what to expect from any of their products in the future. :mad: :rolleyes: :zzz:
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
Henry Minute wrote:
I said FXCop and I meant FXCop.
I have tried for ages to make FxCop enforce rules for private and internal members and I have not been able to do so. Can you share how you enabled it? As far as the design guidelines go, they make most sense when enforced on public/protected members (even though I enforce it everywhere as it comes to me naturally) as it is what developers using your library will use. I personally will not sweat if it s not enforced for private members in tool generated code as long as rest of the code is FxCop compliant.
-
Gary R. Wheeler wrote:
One O.S. to rule them all, one search to find them, one desktop to bring them all, and in the darkness bind them.
Weven does sound like it ought to be a river/village in Middle Earth. Doesn't it?
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
Sort of the low-rent district in Hobbiton, maybe.
Software Zen:
delete this;
Fold With Us![^] -
Henry Minute wrote:
With Windows 7, it's one rule for Redmond, another one for everyone else."
One O.S. to rule them all, one search to find them, one desktop to bring them all, and in the darkness bind them.
Software Zen:
delete this;
Fold With Us![^]